mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
8bae4c7e2d
commit
ede2162d7c
13
inbox.py
13
inbox.py
|
@ -991,12 +991,12 @@ def _receiveLike(recentPostsCache: {},
|
||||||
# if this post in the outbox of the person?
|
# if this post in the outbox of the person?
|
||||||
handleName = handle.split('@')[0]
|
handleName = handle.split('@')[0]
|
||||||
handleDom = handle.split('@')[1]
|
handleDom = handle.split('@')[1]
|
||||||
postFilename = locatePost(baseDir, handleName, handleDom,
|
postLikedId = messageJson['object']
|
||||||
messageJson['object'])
|
postFilename = locatePost(baseDir, handleName, handleDom, postLikedId)
|
||||||
if not postFilename:
|
if not postFilename:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: post not found in inbox or outbox')
|
print('DEBUG: post not found in inbox or outbox')
|
||||||
print(messageJson['object'])
|
print(postLikedId)
|
||||||
return True
|
return True
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: liked post found in inbox')
|
print('DEBUG: liked post found in inbox')
|
||||||
|
@ -1005,13 +1005,12 @@ def _receiveLike(recentPostsCache: {},
|
||||||
handleDom = handle.split('@')[1]
|
handleDom = handle.split('@')[1]
|
||||||
if not _alreadyLiked(baseDir,
|
if not _alreadyLiked(baseDir,
|
||||||
handleName, handleDom,
|
handleName, handleDom,
|
||||||
messageJson['object'],
|
postLikedId,
|
||||||
messageJson['actor']):
|
messageJson['actor']):
|
||||||
_likeNotify(baseDir, domain, onionDomain, handle,
|
_likeNotify(baseDir, domain, onionDomain, handle,
|
||||||
messageJson['actor'], messageJson['object'])
|
messageJson['actor'], postLikedId)
|
||||||
updateLikesCollection(recentPostsCache, baseDir, postFilename,
|
updateLikesCollection(recentPostsCache, baseDir, postFilename,
|
||||||
messageJson['object'],
|
postLikedId, messageJson['actor'], domain, debug)
|
||||||
messageJson['actor'], domain, debug)
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue