merge-requests/30/head
Bob Mottram 2021-10-14 13:09:45 +01:00
parent a5032e0dcc
commit 054f4bde8e
1 changed files with 12 additions and 8 deletions

View File

@ -7402,18 +7402,22 @@ class PubServer(BaseHTTPRequestHandler):
domain, debug) domain, debug)
likeUrl = announceLikeUrl likeUrl = announceLikeUrl
likedPostFilename = announceLikedFilename likedPostFilename = announceLikedFilename
# if debug: if debug:
print('Updating likes for ' + likedPostFilename) print('Updating likes for ' + likedPostFilename)
updateLikesCollection(recentPostsCache, updateLikesCollection(recentPostsCache,
baseDir, likedPostFilename, likeUrl, baseDir, likedPostFilename, likeUrl,
likeActor, self.postToNickname, domain, likeActor, self.postToNickname, domain,
debug) debug)
# if debug: if debug:
print('Regenerating html post for changed likes collection') print('Regenerating html post for changed likes collection')
# clear the icon from the cache so that it gets updated
if self.server.iconsCache.get('like.png'):
del self.server.iconsCache['like.png']
if likedPostJson: if likedPostJson:
cachedPostFilename = \ cachedPostFilename = \
getCachedPostFilename(baseDir, self.postToNickname, getCachedPostFilename(baseDir, self.postToNickname,
domain, likedPostJson) domain, likedPostJson)
if debug:
print('Liked post json: ' + str(likedPostJson)) print('Liked post json: ' + str(likedPostJson))
print('Liked post nickname: ' + print('Liked post nickname: ' +
self.postToNickname + ' ' + domain) self.postToNickname + ' ' + domain)