Check if announced post is in cache

main
Bob Mottram 2021-09-17 18:58:20 +01:00
parent 9d0764f725
commit e29d70cd50
1 changed files with 21 additions and 0 deletions

View File

@ -1364,6 +1364,27 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
return ''
postJsonObject = postJsonAnnounce
# is the announced post in the html cache?
postHtml = \
_getPostFromRecentCache(session, baseDir,
httpPrefix, nickname, domain,
postJsonObject,
postActor,
personCache,
allowDownloads,
showPublicOnly,
storeToCache,
boxName,
avatarUrl,
enableTimingLog,
postStartTime,
pageNumber,
recentPostsCache,
maxRecentPosts,
signingPrivateKeyPem)
if postHtml:
return postHtml
announceFilename = \
locatePost(baseDir, nickname, domain, postJsonObject['id'])
if announceFilename: