Check for liking own post

main
Bob Mottram 2020-07-08 22:28:44 +01:00
parent 10ae18affc
commit 3607bfd439
1 changed files with 2 additions and 5 deletions

View File

@ -1716,11 +1716,8 @@ def likeNotify(baseDir: str, handle: str, actor: str, url: str,
return return
likeFile = accountDir + '/.newLike' likeFile = accountDir + '/.newLike'
domain = handle.split('@')[1] # This is not you liking your own post
nickname = handle.split('@')[0] if actor in url:
actor = httpPrefix + '://' + domain + '/users/' + nickname
# the liked post is one which you made
if actor not in url:
return return
likerNickname = getNicknameFromActor(actor) likerNickname = getNicknameFromActor(actor)
likerDomain, likerPort = getDomainFromActor(actor) likerDomain, likerPort = getDomainFromActor(actor)