Over-zealous function use

merge-requests/30/head
Bob Mottram 2021-06-22 21:30:27 +01:00
parent 9510ac8bf8
commit 214511db01
2 changed files with 4 additions and 1 deletions

View File

@ -400,6 +400,7 @@ def postMessageToOutbox(session, translate: {},
if boxNameIndex == 'inbox' and outboxName == 'tlblogs': if boxNameIndex == 'inbox' and outboxName == 'tlblogs':
continue continue
# avoid duplicates of the message if already going # avoid duplicates of the message if already going
# back to the inbox of the same account # back to the inbox of the same account
if messageJson['to'] != selfActor: if messageJson['to'] != selfActor:

View File

@ -3908,7 +3908,9 @@ def downloadAnnounce(session, baseDir: str, httpPrefix: str,
recentPostsCache: {}, debug: bool) -> {}: recentPostsCache: {}, debug: bool) -> {}:
"""Download the post referenced by an announce """Download the post referenced by an announce
""" """
if not hasObjectDict(postJsonObject): if not postJsonObject.get('object'):
return None
if not isinstance(postJsonObject['object'], str):
return None return None
# ignore self-boosts # ignore self-boosts
if postJsonObject['actor'] in postJsonObject['object']: if postJsonObject['actor'] in postJsonObject['object']: