mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
03c2e4168c
commit
e9a98497c1
98
daemon.py
98
daemon.py
|
@ -1305,7 +1305,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.themeName,
|
||||
self.server.max_like_count,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.CWlists,
|
||||
self.server.lists_enabled,
|
||||
self.server.content_license_url)
|
||||
|
@ -2713,7 +2713,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
customSubmitText,
|
||||
conversationId,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
|
@ -2847,7 +2847,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
customSubmitText,
|
||||
conversationId,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
|
@ -3293,7 +3293,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlHashtagSearch(self.server.cssCache,
|
||||
nickname, domain, port,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
searchStr[1:], 1,
|
||||
|
@ -3393,7 +3393,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber,
|
||||
self.server.projectVersion,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
|
@ -3461,7 +3461,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber,
|
||||
self.server.projectVersion,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
|
@ -3550,7 +3550,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
profileStr = \
|
||||
htmlProfileAfterSearch(self.server.cssCache,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
profilePathStr,
|
||||
|
@ -7535,7 +7535,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlHashtagSearch(self.server.cssCache,
|
||||
nickname, domain, port,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
base_dir, hashtag, pageNumber,
|
||||
maxPostsInHashtagFeed, self.server.session,
|
||||
|
@ -7598,7 +7598,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
rssHashtagSearch(nickname,
|
||||
domain, port,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
base_dir, hashtag,
|
||||
maxPostsInFeed, self.server.session,
|
||||
|
@ -7743,7 +7743,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
showRepeats = not isDM(announceJson)
|
||||
individualPostAsHtml(self.server.signingPrivateKeyPem, False,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -8202,7 +8202,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
showRepeats = not isDM(likedPostJson)
|
||||
individualPostAsHtml(self.server.signingPrivateKeyPem, False,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -8357,7 +8357,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
showRepeats = not isDM(likedPostJson)
|
||||
individualPostAsHtml(self.server.signingPrivateKeyPem, False,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -8540,7 +8540,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
showRepeats = not isDM(reactionPostJson)
|
||||
individualPostAsHtml(self.server.signingPrivateKeyPem, False,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -8713,7 +8713,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
showRepeats = not isDM(reactionPostJson)
|
||||
individualPostAsHtml(self.server.signingPrivateKeyPem, False,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -8813,7 +8813,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlEmojiReactionPicker(self.server.cssCache,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
self.server.session,
|
||||
|
@ -8933,7 +8933,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
showRepeats = not isDM(bookmarkPostJson)
|
||||
individualPostAsHtml(self.server.signingPrivateKeyPem, False,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -9061,7 +9061,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
showRepeats = not isDM(bookmarkPostJson)
|
||||
individualPostAsHtml(self.server.signingPrivateKeyPem, False,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -9163,7 +9163,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
deleteStr = \
|
||||
htmlConfirmDelete(self.server.cssCache,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate, pageNumber,
|
||||
self.server.session, base_dir,
|
||||
deleteUrl, http_prefix,
|
||||
|
@ -9263,7 +9263,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
individualPostAsHtml(self.server.signingPrivateKeyPem,
|
||||
allowDownloads,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -9373,7 +9373,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
individualPostAsHtml(self.server.signingPrivateKeyPem,
|
||||
allowDownloads,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
|
@ -9482,7 +9482,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self._404()
|
||||
return True
|
||||
recentPostsCache = self.server.recentPostsCache
|
||||
maxRecentPosts = self.server.maxRecentPosts
|
||||
max_recent_posts = self.server.max_recent_posts
|
||||
translate = self.server.translate
|
||||
session = self.server.session
|
||||
cachedWebfingers = self.server.cachedWebfingers
|
||||
|
@ -9495,7 +9495,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlPostReplies(self.server.cssCache,
|
||||
recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate,
|
||||
base_dir,
|
||||
session,
|
||||
|
@ -9574,7 +9574,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self._404()
|
||||
return True
|
||||
recentPostsCache = self.server.recentPostsCache
|
||||
maxRecentPosts = self.server.maxRecentPosts
|
||||
max_recent_posts = self.server.max_recent_posts
|
||||
translate = self.server.translate
|
||||
session = self.server.session
|
||||
cachedWebfingers = self.server.cachedWebfingers
|
||||
|
@ -9587,7 +9587,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlPostReplies(self.server.cssCache,
|
||||
recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate,
|
||||
base_dir,
|
||||
session,
|
||||
|
@ -9694,7 +9694,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
base_dir, http_prefix, True,
|
||||
|
@ -9810,7 +9810,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
base_dir, http_prefix, True,
|
||||
|
@ -9977,7 +9977,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlIndividualPost(self.server.cssCache,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
self.server.session,
|
||||
|
@ -10152,7 +10152,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
debug: str,
|
||||
recentPostsCache: {}, session,
|
||||
defaultTimeline: str,
|
||||
maxRecentPosts: int,
|
||||
max_recent_posts: int,
|
||||
translate: {},
|
||||
cachedWebfingers: {},
|
||||
personCache: {},
|
||||
|
@ -10228,7 +10228,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = htmlInbox(self.server.cssCache,
|
||||
defaultTimeline,
|
||||
recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate,
|
||||
pageNumber, maxPostsInFeed,
|
||||
session,
|
||||
|
@ -10379,7 +10379,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlInboxDMs(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
|
@ -10522,7 +10522,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlInboxReplies(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
|
@ -10663,7 +10663,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlInboxMedia(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInMediaFeed,
|
||||
self.server.session,
|
||||
|
@ -10805,7 +10805,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlInboxBlogs(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInBlogsFeed,
|
||||
self.server.session,
|
||||
|
@ -10956,7 +10956,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlInboxNews(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInNewsFeed,
|
||||
self.server.session,
|
||||
|
@ -11106,7 +11106,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlInboxFeatures(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInBlogsFeed,
|
||||
self.server.session,
|
||||
|
@ -11217,7 +11217,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlShares(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
|
@ -11302,7 +11302,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlWanted(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
|
@ -11422,7 +11422,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlBookmarks(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
|
@ -11562,7 +11562,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlOutbox(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
|
@ -11695,7 +11695,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
htmlModeration(self.server.cssCache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
|
@ -11826,7 +11826,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
base_dir, http_prefix,
|
||||
|
@ -11947,7 +11947,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
base_dir, http_prefix,
|
||||
|
@ -12066,7 +12066,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
base_dir,
|
||||
|
@ -12202,7 +12202,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
base_dir,
|
||||
|
@ -12972,7 +12972,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
customSubmitText,
|
||||
conversationId,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
|
@ -15903,7 +15903,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.session,
|
||||
self.server.defaultTimeline,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
|
@ -18452,7 +18452,7 @@ def runDaemon(content_license_url: str,
|
|||
news_instance: bool,
|
||||
blogs_instance: bool,
|
||||
media_instance: bool,
|
||||
maxRecentPosts: int,
|
||||
max_recent_posts: int,
|
||||
enableSharedInbox: bool, registration: bool,
|
||||
language: str, projectVersion: str,
|
||||
instanceId: str, clientToServer: bool,
|
||||
|
@ -18885,7 +18885,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.thrSharesExpire.start()
|
||||
|
||||
httpd.recentPostsCache = {}
|
||||
httpd.maxRecentPosts = maxRecentPosts
|
||||
httpd.max_recent_posts = max_recent_posts
|
||||
httpd.iconsCache = {}
|
||||
httpd.fontsCache = {}
|
||||
|
||||
|
@ -18907,7 +18907,7 @@ def runDaemon(content_license_url: str,
|
|||
print('Creating inbox queue')
|
||||
httpd.thrInboxQueue = \
|
||||
threadWithTrace(target=runInboxQueue,
|
||||
args=(httpd.recentPostsCache, httpd.maxRecentPosts,
|
||||
args=(httpd.recentPostsCache, httpd.max_recent_posts,
|
||||
projectVersion,
|
||||
base_dir, http_prefix, httpd.sendThreads,
|
||||
httpd.postLog, httpd.cachedWebfingers,
|
||||
|
|
|
@ -223,7 +223,7 @@ parser.add_argument('--followers',
|
|||
dest='followers', type=str,
|
||||
default='',
|
||||
help='Show list of followers for the given actor')
|
||||
parser.add_argument('--postcache', dest='maxRecentPosts', type=int,
|
||||
parser.add_argument('--postcache', dest='max_recent_posts', type=int,
|
||||
default=512,
|
||||
help='The maximum number of recent posts to store in RAM')
|
||||
parser.add_argument('--proxy', dest='proxyPort', type=int, default=None,
|
||||
|
@ -3243,7 +3243,7 @@ if __name__ == "__main__":
|
|||
args.minimumvotes,
|
||||
args.newsinstance,
|
||||
args.blogsinstance, args.mediainstance,
|
||||
args.maxRecentPosts,
|
||||
args.max_recent_posts,
|
||||
not args.nosharedinbox,
|
||||
registration, args.language, __version__,
|
||||
instanceId, args.client, base_dir,
|
||||
|
|
60
inbox.py
60
inbox.py
|
@ -278,7 +278,7 @@ def storeHashTags(base_dir: str, nickname: str, domain: str,
|
|||
http_prefix, domainFull, translate)
|
||||
|
||||
|
||||
def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
||||
def _inboxStorePostToHtmlCache(recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
|
@ -305,7 +305,7 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
|||
yt_replace_domain = getConfigParam(base_dir, 'youtubedomain')
|
||||
twitterReplacementDomain = getConfigParam(base_dir, 'twitterdomain')
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache, maxRecentPosts,
|
||||
True, recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
base_dir, session, cachedWebfingers,
|
||||
personCache,
|
||||
|
@ -997,7 +997,7 @@ def _receiveLike(recentPostsCache: {},
|
|||
personCache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
maxRecentPosts: int, translate: {},
|
||||
max_recent_posts: int, translate: {},
|
||||
allowDeletion: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1091,7 +1091,7 @@ def _receiveLike(recentPostsCache: {},
|
|||
followerApprovalActive(base_dir, handleName, domain)
|
||||
notDM = not isDM(likedPostJson)
|
||||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
handleName, domain, port, likedPostJson,
|
||||
|
@ -1119,7 +1119,7 @@ def _receiveUndoLike(recentPostsCache: {},
|
|||
personCache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
maxRecentPosts: int, translate: {},
|
||||
max_recent_posts: int, translate: {},
|
||||
allowDeletion: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1202,7 +1202,7 @@ def _receiveUndoLike(recentPostsCache: {},
|
|||
followerApprovalActive(base_dir, handleName, domain)
|
||||
notDM = not isDM(likedPostJson)
|
||||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
handleName, domain, port, likedPostJson,
|
||||
|
@ -1231,7 +1231,7 @@ def _receiveReaction(recentPostsCache: {},
|
|||
personCache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
maxRecentPosts: int, translate: {},
|
||||
max_recent_posts: int, translate: {},
|
||||
allowDeletion: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1350,7 +1350,7 @@ def _receiveReaction(recentPostsCache: {},
|
|||
followerApprovalActive(base_dir, handleName, domain)
|
||||
notDM = not isDM(reactionPostJson)
|
||||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
handleName, domain, port, reactionPostJson,
|
||||
|
@ -1378,7 +1378,7 @@ def _receiveUndoReaction(recentPostsCache: {},
|
|||
personCache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
maxRecentPosts: int, translate: {},
|
||||
max_recent_posts: int, translate: {},
|
||||
allowDeletion: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1477,7 +1477,7 @@ def _receiveUndoReaction(recentPostsCache: {},
|
|||
followerApprovalActive(base_dir, handleName, domain)
|
||||
notDM = not isDM(reactionPostJson)
|
||||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
handleName, domain, port, reactionPostJson,
|
||||
|
@ -1504,7 +1504,7 @@ def _receiveBookmark(recentPostsCache: {},
|
|||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
||||
personCache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool, signingPrivateKeyPem: str,
|
||||
maxRecentPosts: int, translate: {},
|
||||
max_recent_posts: int, translate: {},
|
||||
allowDeletion: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1587,7 +1587,7 @@ def _receiveBookmark(recentPostsCache: {},
|
|||
followerApprovalActive(base_dir, nickname, domain)
|
||||
notDM = not isDM(bookmarkedPostJson)
|
||||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
nickname, domain, port, bookmarkedPostJson,
|
||||
|
@ -1614,7 +1614,7 @@ def _receiveUndoBookmark(recentPostsCache: {},
|
|||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
||||
personCache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool, signingPrivateKeyPem: str,
|
||||
maxRecentPosts: int, translate: {},
|
||||
max_recent_posts: int, translate: {},
|
||||
allowDeletion: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1698,7 +1698,7 @@ def _receiveUndoBookmark(recentPostsCache: {},
|
|||
followerApprovalActive(base_dir, nickname, domain)
|
||||
notDM = not isDM(bookmarkedPostJson)
|
||||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
nickname, domain, port, bookmarkedPostJson,
|
||||
|
@ -1805,7 +1805,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
|||
allow_local_network_access: bool,
|
||||
themeName: str, systemLanguage: str,
|
||||
signingPrivateKeyPem: str,
|
||||
maxRecentPosts: int,
|
||||
max_recent_posts: int,
|
||||
allowDeletion: bool,
|
||||
peertubeInstances: [],
|
||||
max_like_count: int, CWlists: {},
|
||||
|
@ -1905,7 +1905,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
|||
print('Generating html for announce ' + messageJson['id'])
|
||||
announceHtml = \
|
||||
individualPostAsHtml(signingPrivateKeyPem, True,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
nickname, domain, port, messageJson,
|
||||
|
@ -2978,7 +2978,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
|||
federationList: [], sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
signingPrivateKeyPem: str,
|
||||
maxRecentPosts: int, translate: {},
|
||||
max_recent_posts: int, translate: {},
|
||||
allowDeletion: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -3017,7 +3017,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
|||
followerApprovalActive(base_dir, nickname, domain)
|
||||
notDM = not isDM(questionJson)
|
||||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
nickname, domain, port, questionJson,
|
||||
|
@ -3175,7 +3175,7 @@ def _checkForGitPatches(base_dir: str, nickname: str, domain: str,
|
|||
return 0
|
||||
|
||||
|
||||
def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||
def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||
session, keyId: str, handle: str, messageJson: {},
|
||||
base_dir: str, http_prefix: str, sendThreads: [],
|
||||
postLog: [], cachedWebfingers: {}, personCache: {},
|
||||
|
@ -3221,7 +3221,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
messageJson,
|
||||
federationList,
|
||||
debug, signingPrivateKeyPem,
|
||||
maxRecentPosts, translate,
|
||||
max_recent_posts, translate,
|
||||
allowDeletion,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -3243,7 +3243,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
messageJson,
|
||||
federationList,
|
||||
debug, signingPrivateKeyPem,
|
||||
maxRecentPosts, translate,
|
||||
max_recent_posts, translate,
|
||||
allowDeletion,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -3266,7 +3266,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
messageJson,
|
||||
federationList,
|
||||
debug, signingPrivateKeyPem,
|
||||
maxRecentPosts, translate,
|
||||
max_recent_posts, translate,
|
||||
allowDeletion,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -3288,7 +3288,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
messageJson,
|
||||
federationList,
|
||||
debug, signingPrivateKeyPem,
|
||||
maxRecentPosts, translate,
|
||||
max_recent_posts, translate,
|
||||
allowDeletion,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -3310,7 +3310,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
messageJson,
|
||||
federationList,
|
||||
debug, signingPrivateKeyPem,
|
||||
maxRecentPosts, translate,
|
||||
max_recent_posts, translate,
|
||||
allowDeletion,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -3332,7 +3332,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
messageJson,
|
||||
federationList,
|
||||
debug, signingPrivateKeyPem,
|
||||
maxRecentPosts, translate,
|
||||
max_recent_posts, translate,
|
||||
allowDeletion,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -3362,7 +3362,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
allow_local_network_access,
|
||||
themeName, systemLanguage,
|
||||
signingPrivateKeyPem,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
allowDeletion,
|
||||
peertubeInstances,
|
||||
max_like_count, CWlists, lists_enabled):
|
||||
|
@ -3454,7 +3454,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
federationList, sendThreads, postLog,
|
||||
cachedWebfingers, personCache,
|
||||
signingPrivateKeyPem,
|
||||
maxRecentPosts, translate,
|
||||
max_recent_posts, translate,
|
||||
allowDeletion,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -3552,7 +3552,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
htmlCacheStartTime = time.time()
|
||||
handleName = handle.split('@')[0]
|
||||
_inboxStorePostToHtmlCache(recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, base_dir,
|
||||
http_prefix,
|
||||
session, cachedWebfingers,
|
||||
|
@ -4058,7 +4058,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
|||
signingPrivateKeyPem)
|
||||
|
||||
|
||||
def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
||||
def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
||||
projectVersion: str,
|
||||
base_dir: str, http_prefix: str,
|
||||
sendThreads: [], postLog: [],
|
||||
|
@ -4486,7 +4486,7 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
|||
destination = \
|
||||
queueJson['destination'].replace(inboxHandle, handle)
|
||||
_inboxAfterInitial(recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
session, keyId, handle,
|
||||
queueJson['post'],
|
||||
base_dir, http_prefix,
|
||||
|
|
|
@ -537,7 +537,7 @@ def _convertRSStoActivityPub(base_dir: str, http_prefix: str,
|
|||
domain: str, port: int,
|
||||
newswire: {},
|
||||
translate: {},
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
session, cachedWebfingers: {},
|
||||
personCache: {},
|
||||
federationList: [],
|
||||
|
@ -826,7 +826,7 @@ def runNewswireDaemon(base_dir: str, httpd,
|
|||
http_prefix, domain, port,
|
||||
newNewswire, translate,
|
||||
httpd.recentPostsCache,
|
||||
httpd.maxRecentPosts,
|
||||
httpd.max_recent_posts,
|
||||
httpd.session,
|
||||
httpd.cachedWebfingers,
|
||||
httpd.personCache,
|
||||
|
|
|
@ -198,7 +198,7 @@ def postMessageToOutbox(session, translate: {},
|
|||
signingPrivateKeyPem: str,
|
||||
peertubeInstances: str, theme: str,
|
||||
max_like_count: int,
|
||||
maxRecentPosts: int, CWlists: {},
|
||||
max_recent_posts: int, CWlists: {},
|
||||
lists_enabled: str,
|
||||
content_license_url: str) -> bool:
|
||||
"""post is received by the outbox
|
||||
|
@ -454,7 +454,7 @@ def postMessageToOutbox(session, translate: {},
|
|||
postToNickname, domain)
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
False, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, pageNumber,
|
||||
base_dir, session,
|
||||
cachedWebfingers,
|
||||
|
|
|
@ -126,7 +126,7 @@ def _updatePostSchedule(base_dir: str, handle: str, httpd,
|
|||
httpd.peertubeInstances,
|
||||
httpd.themeName,
|
||||
httpd.max_like_count,
|
||||
httpd.maxRecentPosts,
|
||||
httpd.max_recent_posts,
|
||||
httpd.CWlists,
|
||||
httpd.lists_enabled,
|
||||
httpd.content_license_url):
|
||||
|
|
10
tests.py
10
tests.py
|
@ -3532,17 +3532,17 @@ def _testTheme():
|
|||
def _testRecentPostsCache():
|
||||
print('testRecentPostsCache')
|
||||
recentPostsCache = {}
|
||||
maxRecentPosts = 3
|
||||
max_recent_posts = 3
|
||||
htmlStr = '<html></html>'
|
||||
for i in range(5):
|
||||
postJsonObject = {
|
||||
"id": "https://somesite.whatever/users/someuser/statuses/" + str(i)
|
||||
}
|
||||
updateRecentPostsCache(recentPostsCache, maxRecentPosts,
|
||||
updateRecentPostsCache(recentPostsCache, max_recent_posts,
|
||||
postJsonObject, htmlStr)
|
||||
assert len(recentPostsCache['index']) == maxRecentPosts
|
||||
assert len(recentPostsCache['json'].items()) == maxRecentPosts
|
||||
assert len(recentPostsCache['html'].items()) == maxRecentPosts
|
||||
assert len(recentPostsCache['index']) == max_recent_posts
|
||||
assert len(recentPostsCache['json'].items()) == max_recent_posts
|
||||
assert len(recentPostsCache['html'].items()) == max_recent_posts
|
||||
|
||||
|
||||
def _testRemoveTextFormatting():
|
||||
|
|
4
utils.py
4
utils.py
|
@ -2001,7 +2001,7 @@ def getCachedPostFilename(base_dir: str, nickname: str, domain: str,
|
|||
return cachedPostFilename + '.html'
|
||||
|
||||
|
||||
def updateRecentPostsCache(recentPostsCache: {}, maxRecentPosts: int,
|
||||
def updateRecentPostsCache(recentPostsCache: {}, max_recent_posts: int,
|
||||
postJsonObject: {}, htmlStr: str) -> None:
|
||||
"""Store recent posts in memory so that they can be quickly recalled
|
||||
"""
|
||||
|
@ -2019,7 +2019,7 @@ def updateRecentPostsCache(recentPostsCache: {}, maxRecentPosts: int,
|
|||
recentPostsCache['json'][postId] = json.dumps(postJsonObject)
|
||||
recentPostsCache['html'][postId] = htmlStr
|
||||
|
||||
while len(recentPostsCache['html'].items()) > maxRecentPosts:
|
||||
while len(recentPostsCache['html'].items()) > max_recent_posts:
|
||||
postId = recentPostsCache['index'][0]
|
||||
recentPostsCache['index'].pop(0)
|
||||
if recentPostsCache['json'].get(postId):
|
||||
|
|
|
@ -24,7 +24,7 @@ from webapp_post import individualPostAsHtml
|
|||
|
||||
|
||||
def htmlConfirmDelete(cssCache: {},
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate, pageNumber: int,
|
||||
session, base_dir: str, messageId: str,
|
||||
http_prefix: str, projectVersion: str,
|
||||
|
@ -66,7 +66,7 @@ def htmlConfirmDelete(cssCache: {},
|
|||
htmlHeaderWithExternalStyle(cssFilename, instanceTitle, None)
|
||||
deletePostStr += \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache, maxRecentPosts,
|
||||
True, recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
base_dir, session, cachedWebfingers, personCache,
|
||||
nickname, domain, port, postJsonObject,
|
||||
|
|
|
@ -197,7 +197,7 @@ def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
|||
theme: str, noDropDown: bool,
|
||||
accessKeys: {}, customSubmitText: str,
|
||||
conversationId: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
session, cachedWebfingers: {},
|
||||
personCache: {}, port: int,
|
||||
postJsonObject: {},
|
||||
|
@ -261,7 +261,7 @@ def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
|||
newPostText += \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session,
|
||||
cachedWebfingers,
|
||||
|
|
|
@ -22,7 +22,7 @@ from webapp_column_right import getRightColumnContent
|
|||
from webapp_post import individualPostAsHtml
|
||||
|
||||
|
||||
def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||
def _htmlFrontScreenPosts(recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
nickname: str, domain: str, port: int,
|
||||
|
@ -66,7 +66,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
|||
postStr = \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session,
|
||||
cachedWebfingers,
|
||||
|
@ -97,7 +97,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
|||
rss_icon_at_top: bool,
|
||||
cssCache: {}, icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, projectVersion: str,
|
||||
base_dir: str, http_prefix: str, authorized: bool,
|
||||
profileJson: {}, selected: str,
|
||||
|
@ -173,7 +173,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
|||
bannerFile, bannerFilename = \
|
||||
getBannerFile(base_dir, nickname, domain, theme)
|
||||
profileStr += \
|
||||
_htmlFrontScreenPosts(recentPostsCache, maxRecentPosts,
|
||||
_htmlFrontScreenPosts(recentPostsCache, max_recent_posts,
|
||||
translate,
|
||||
base_dir, http_prefix,
|
||||
nickname, domain, port,
|
||||
|
|
|
@ -31,7 +31,7 @@ from session import createSession
|
|||
|
||||
|
||||
def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str, wfRequest: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
|
@ -60,7 +60,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
"""
|
||||
artist = isArtist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
wfRequest, personCache,
|
||||
|
|
|
@ -283,7 +283,7 @@ def _getPostFromRecentCache(session,
|
|||
postStartTime,
|
||||
pageNumber: int,
|
||||
recentPostsCache: {},
|
||||
maxRecentPosts: int,
|
||||
max_recent_posts: int,
|
||||
signingPrivateKeyPem: str) -> str:
|
||||
"""Attempts to get the html post from the recent posts cache in memory
|
||||
"""
|
||||
|
@ -324,7 +324,7 @@ def _getPostFromRecentCache(session,
|
|||
|
||||
postHtml = \
|
||||
preparePostFromHtmlCache(nickname, postHtml, boxName, pageNumber)
|
||||
updateRecentPostsCache(recentPostsCache, maxRecentPosts,
|
||||
updateRecentPostsCache(recentPostsCache, max_recent_posts,
|
||||
postJsonObject, postHtml)
|
||||
_logPostTiming(enableTimingLog, postStartTime, '3')
|
||||
return postHtml
|
||||
|
@ -1321,7 +1321,7 @@ def _getFooterWithIcons(showIcons: bool,
|
|||
|
||||
def individualPostAsHtml(signingPrivateKeyPem: str,
|
||||
allowDownloads: bool,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
pageNumber: int, base_dir: str,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1403,7 +1403,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
postStartTime,
|
||||
pageNumber,
|
||||
recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
signingPrivateKeyPem)
|
||||
if postHtml:
|
||||
return postHtml
|
||||
|
@ -1531,7 +1531,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
postStartTime,
|
||||
pageNumber,
|
||||
recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
signingPrivateKeyPem)
|
||||
if postHtml:
|
||||
return postHtml
|
||||
|
@ -1982,7 +1982,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
boxName != 'bookmarks':
|
||||
_saveIndividualPostAsHtmlToCache(base_dir, nickname, domain,
|
||||
postJsonObject, postHtml)
|
||||
updateRecentPostsCache(recentPostsCache, maxRecentPosts,
|
||||
updateRecentPostsCache(recentPostsCache, max_recent_posts,
|
||||
postJsonObject, postHtml)
|
||||
|
||||
_logPostTiming(enableTimingLog, postStartTime, '19')
|
||||
|
@ -1991,7 +1991,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
|
||||
|
||||
def htmlIndividualPost(cssCache: {},
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, session, cachedWebfingers: {},
|
||||
personCache: {},
|
||||
|
@ -2058,7 +2058,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
|
||||
postStr += \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache, maxRecentPosts,
|
||||
True, recentPostsCache, max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers, personCache,
|
||||
nickname, domain, port, postJsonObject,
|
||||
|
@ -2087,7 +2087,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
postStr = \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
personCache,
|
||||
|
@ -2123,7 +2123,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
postStr += \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
personCache,
|
||||
|
@ -2153,7 +2153,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
|
||||
|
||||
def htmlPostReplies(cssCache: {},
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, base_dir: str,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, repliesJson: {},
|
||||
|
@ -2175,7 +2175,7 @@ def htmlPostReplies(cssCache: {},
|
|||
repliesStr += \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
personCache,
|
||||
|
@ -2204,7 +2204,7 @@ def htmlPostReplies(cssCache: {},
|
|||
|
||||
|
||||
def htmlEmojiReactionPicker(cssCache: {},
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, session, cachedWebfingers: {},
|
||||
personCache: {},
|
||||
|
@ -2227,7 +2227,7 @@ def htmlEmojiReactionPicker(cssCache: {},
|
|||
translate['Select reaction'].title() + '</label></center>\n' + \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
personCache,
|
||||
|
|
|
@ -122,7 +122,7 @@ def _validProfilePreviewPost(postJsonObject: {},
|
|||
|
||||
|
||||
def htmlProfileAfterSearch(cssCache: {},
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, path: str, http_prefix: str,
|
||||
nickname: str, domain: str, port: int,
|
||||
|
@ -334,7 +334,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
|
||||
profileStr += \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache, maxRecentPosts,
|
||||
True, recentPostsCache, max_recent_posts,
|
||||
translate, None, base_dir,
|
||||
session, cachedWebfingers, personCache,
|
||||
nickname, domain, port,
|
||||
|
@ -542,7 +542,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
rss_icon_at_top: bool,
|
||||
cssCache: {}, icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, projectVersion: str,
|
||||
base_dir: str, http_prefix: str, authorized: bool,
|
||||
profileJson: {}, selected: str,
|
||||
|
@ -571,7 +571,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
rss_icon_at_top,
|
||||
cssCache, icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, projectVersion,
|
||||
base_dir, http_prefix, authorized,
|
||||
profileJson, selected,
|
||||
|
@ -952,7 +952,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
|
||||
if selected == 'posts':
|
||||
profileStr += \
|
||||
_htmlProfilePosts(recentPostsCache, maxRecentPosts,
|
||||
_htmlProfilePosts(recentPostsCache, max_recent_posts,
|
||||
translate,
|
||||
base_dir, http_prefix, authorized,
|
||||
nickname, domain, port,
|
||||
|
@ -1019,7 +1019,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
return profileStr
|
||||
|
||||
|
||||
def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||
def _htmlProfilePosts(recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
authorized: bool,
|
||||
|
@ -1064,7 +1064,7 @@ def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
|||
postStr = \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
personCache,
|
||||
|
|
|
@ -592,7 +592,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
|||
postsPerPage: int, pageNumber: int,
|
||||
projectVersion: str,
|
||||
recentPostsCache: {},
|
||||
maxRecentPosts: int,
|
||||
max_recent_posts: int,
|
||||
session,
|
||||
cachedWebfingers,
|
||||
personCache: {},
|
||||
|
@ -675,7 +675,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
|||
postStr = \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
personCache,
|
||||
|
@ -704,7 +704,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
|||
|
||||
def htmlHashtagSearch(cssCache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, hashtag: str, pageNumber: int,
|
||||
postsPerPage: int,
|
||||
|
@ -857,7 +857,7 @@ def htmlHashtagSearch(cssCache: {},
|
|||
postStr = \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
allowDownloads, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
personCache,
|
||||
|
@ -897,7 +897,7 @@ def htmlHashtagSearch(cssCache: {},
|
|||
|
||||
|
||||
def rssHashtagSearch(nickname: str, domain: str, port: int,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, hashtag: str,
|
||||
postsPerPage: int,
|
||||
|
|
|
@ -419,7 +419,7 @@ def _pageNumberButtons(usersPath: str, boxName: str, pageNumber: int) -> str:
|
|||
|
||||
|
||||
def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int,
|
||||
itemsPerPage: int, session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -896,7 +896,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
currTlStr = \
|
||||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
False, recentPostsCache,
|
||||
maxRecentPosts,
|
||||
max_recent_posts,
|
||||
translate, pageNumber,
|
||||
base_dir, session,
|
||||
cachedWebfingers,
|
||||
|
@ -1119,7 +1119,7 @@ def _htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
|
|||
|
||||
|
||||
def htmlShares(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1151,7 +1151,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
artist = isArtist(base_dir, nickname)
|
||||
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1177,7 +1177,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlWanted(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1209,7 +1209,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
artist = isArtist(base_dir, nickname)
|
||||
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1235,7 +1235,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1268,7 +1268,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
artist = isArtist(base_dir, nickname)
|
||||
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1294,7 +1294,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1327,7 +1327,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
artist = isArtist(base_dir, nickname)
|
||||
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1352,7 +1352,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1382,7 +1382,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
"""
|
||||
artist = isArtist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1404,7 +1404,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1434,7 +1434,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
"""
|
||||
artist = isArtist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1457,7 +1457,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1487,7 +1487,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
"""
|
||||
artist = isArtist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1510,7 +1510,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1540,7 +1540,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
"""
|
||||
artist = isArtist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1563,7 +1563,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1593,7 +1593,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
"""Show the features timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1616,7 +1616,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1645,7 +1645,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
"""Show the news timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
@ -1668,7 +1668,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
|
@ -1700,7 +1700,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
followerApprovalActive(base_dir, nickname, domain)
|
||||
artist = isArtist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
recentPostsCache, maxRecentPosts,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
|
|
Loading…
Reference in New Issue