From 290ea18b0b1588a419a6c19d2c8c919e01d05eac Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 8 Jul 2020 22:04:19 +0100 Subject: [PATCH] Check nickname and domain --- inbox.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inbox.py b/inbox.py index 237fa98b..e05e8abb 100644 --- a/inbox.py +++ b/inbox.py @@ -1719,9 +1719,15 @@ def likeNotify(baseDir: str, handle: str, actor: str, url: str) -> None: # the liked post is one which you made if actor not in url: return + likerNickname = None + likerDomain = None likerNickname = getNicknameFromActor(actor) likerDomain, likerPort = getDomainFromActor(actor) - likerHandle = likerNickname + '@' + likerDomain + if likerNickname and likerDomain: + likerHandle = likerNickname + '@' + likerDomain + else: + print('likeNotify actor: ' + str(actor)) + likerHandle = actor if likerHandle != handle: with open(likeFile, 'w') as fp: fp.write(likerHandle + ' ' + url)