Notify before updating likes collection

merge-requests/21/head
Bob Mottram 2021-03-12 15:34:56 +00:00
parent 0e2ee60547
commit fa66fdbed9
1 changed files with 3 additions and 3 deletions

View File

@ -994,15 +994,15 @@ def _receiveLike(recentPostsCache: {},
handleName = handle.split('@')[0]
handleDom = handle.split('@')[1]
updateLikesCollection(recentPostsCache, baseDir, postFilename,
messageJson['object'],
messageJson['actor'], domain, debug)
if not _alreadyLiked(baseDir,
handleName, handleDom,
messageJson['object'],
messageJson['actor']):
_likeNotify(baseDir, domain, onionDomain, handle,
messageJson['actor'], messageJson['object'])
updateLikesCollection(recentPostsCache, baseDir, postFilename,
messageJson['object'],
messageJson['actor'], domain, debug)
return True