Handle unwrapped posts

main2
Bob Mottram 2019-10-01 15:11:15 +01:00
parent c8de9ae6c8
commit 5b35225532
1 changed files with 7 additions and 4 deletions

View File

@ -989,6 +989,9 @@ def receiveAnnounce(session,handle: str,baseDir: str, \
# Try to obtain the actor for this person # Try to obtain the actor for this person
# so that their avatar can be shown # so that their avatar can be shown
lookupActor=None lookupActor=None
if postJsonObject.get('attributedTo'):
lookupActor=postJsonObject['attributedTo']
else:
if postJsonObject.get('object'): if postJsonObject.get('object'):
if isinstance(postJsonObject['object'], dict): if isinstance(postJsonObject['object'], dict):
if postJsonObject['object'].get('attributedTo'): if postJsonObject['object'].get('attributedTo'):