Check for liking own post

merge-requests/8/head
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
likeFile = accountDir + '/.newLike'
domain = handle.split('@')[1]
nickname = handle.split('@')[0]
actor = httpPrefix + '://' + domain + '/users/' + nickname
# the liked post is one which you made
if actor not in url:
# This is not you liking your own post
if actor in url:
return
likerNickname = getNicknameFromActor(actor)
likerDomain, likerPort = getDomainFromActor(actor)