From 6b18120f882cbe2279f2cc2efae091be85f7cc30 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 4 Sep 2021 11:11:46 +0100 Subject: [PATCH] Generate html after receiving announce --- inbox.py | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/inbox.py b/inbox.py index 2f3d95584..5f063a97f 100644 --- a/inbox.py +++ b/inbox.py @@ -1434,7 +1434,11 @@ def _receiveAnnounce(recentPostsCache: {}, YTReplacementDomain: str, allowLocalNetworkAccess: bool, themeName: str, systemLanguage: str, - signingPrivateKeyPem: str) -> bool: + signingPrivateKeyPem: str, + maxRecentPosts: int, + allowDeletion: bool, + peertubeInstances: [], + maxLikeCount: int) -> bool: """Receives an announce activity within the POST section of HTTPServer """ if messageJson['type'] != 'Announce': @@ -1600,6 +1604,30 @@ def _receiveAnnounce(recentPostsCache: {}, time.sleep(5) if debug: print('DEBUG: announced/repeated post arrived in inbox') + if postJsonObject: + pageNumber = 1 + showPublishedDateOnly = False + showIndividualPostIcons = True + manuallyApproveFollowers = \ + followerApprovalActive(baseDir, nickname, domain) + notDM = True + 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) + return True @@ -2546,7 +2574,11 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int, YTReplacementDomain, allowLocalNetworkAccess, themeName, systemLanguage, - signingPrivateKeyPem): + signingPrivateKeyPem, + maxRecentPosts, + allowDeletion, + peertubeInstances, + maxLikeCount): if debug: print('DEBUG: Announce accepted from ' + actor)