mirror of https://gitlab.com/bashrc2/epicyon
Generate html for announce first
parent
c5d89455fb
commit
4a7c6c6976
63
inbox.py
63
inbox.py
|
@ -1529,6 +1529,40 @@ def _receiveAnnounce(recentPostsCache: {},
|
||||||
print('DEBUG: Downloading announce post ' + messageJson['actor'] +
|
print('DEBUG: Downloading announce post ' + messageJson['actor'] +
|
||||||
' -> ' + messageJson['object'])
|
' -> ' + messageJson['object'])
|
||||||
domainFull = getFullDomain(domain, port)
|
domainFull = getFullDomain(domain, port)
|
||||||
|
|
||||||
|
# generate html
|
||||||
|
pageNumber = 1
|
||||||
|
showPublishedDateOnly = False
|
||||||
|
showIndividualPostIcons = True
|
||||||
|
manuallyApproveFollowers = \
|
||||||
|
followerApprovalActive(baseDir, nickname, domain)
|
||||||
|
notDM = True
|
||||||
|
# if debug:
|
||||||
|
print('Generating html for announce ' + messageJson['id'])
|
||||||
|
announceHtml = \
|
||||||
|
individualPostAsHtml(signingPrivateKeyPem, True,
|
||||||
|
recentPostsCache, maxRecentPosts,
|
||||||
|
translate, pageNumber, baseDir,
|
||||||
|
session, cachedWebfingers, personCache,
|
||||||
|
nickname, domain, port, messageJson,
|
||||||
|
None, True, allowDeletion,
|
||||||
|
httpPrefix, __version__,
|
||||||
|
'inbox', YTReplacementDomain,
|
||||||
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
|
allowLocalNetworkAccess,
|
||||||
|
themeName, systemLanguage,
|
||||||
|
maxLikeCount, notDM,
|
||||||
|
showIndividualPostIcons,
|
||||||
|
manuallyApproveFollowers,
|
||||||
|
False, True, False)
|
||||||
|
if not announceHtml:
|
||||||
|
print('WARN: Unable to generate html for announce ' +
|
||||||
|
str(messageJson))
|
||||||
|
else:
|
||||||
|
# if debug:
|
||||||
|
print('Generated announce html ' + announceHtml.replace('\n', ''))
|
||||||
|
|
||||||
postJsonObject = downloadAnnounce(session, baseDir,
|
postJsonObject = downloadAnnounce(session, baseDir,
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
|
@ -1605,35 +1639,6 @@ def _receiveAnnounce(recentPostsCache: {},
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: announced/repeated post arrived in inbox')
|
print('DEBUG: announced/repeated post arrived in inbox')
|
||||||
|
|
||||||
pageNumber = 1
|
|
||||||
showPublishedDateOnly = False
|
|
||||||
showIndividualPostIcons = True
|
|
||||||
manuallyApproveFollowers = \
|
|
||||||
followerApprovalActive(baseDir, nickname, domain)
|
|
||||||
notDM = True
|
|
||||||
#if debug:
|
|
||||||
print('Generating html for announce ' + postJsonObject['id'])
|
|
||||||
announceHtml = \
|
|
||||||
individualPostAsHtml(signingPrivateKeyPem, True,
|
|
||||||
recentPostsCache, maxRecentPosts,
|
|
||||||
translate, pageNumber, baseDir,
|
|
||||||
session, cachedWebfingers, personCache,
|
|
||||||
nickname, domain, port, postJsonObject,
|
|
||||||
None, True, allowDeletion,
|
|
||||||
httpPrefix, __version__,
|
|
||||||
'inbox', YTReplacementDomain,
|
|
||||||
showPublishedDateOnly,
|
|
||||||
peertubeInstances,
|
|
||||||
allowLocalNetworkAccess,
|
|
||||||
themeName, systemLanguage,
|
|
||||||
maxLikeCount, notDM,
|
|
||||||
showIndividualPostIcons,
|
|
||||||
manuallyApproveFollowers,
|
|
||||||
False, True, False)
|
|
||||||
if not announceHtml:
|
|
||||||
print('WARN: Unable to generate html for announce ' +
|
|
||||||
postJsonObject['id'])
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue