Attributed within object

main
Bob Mottram 2021-07-07 10:49:46 +01:00
parent 21a9e06c26
commit 7b6c939b92
1 changed files with 11 additions and 10 deletions

View File

@ -2535,8 +2535,9 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
# should we notify that a post from this person has arrived?
# This is for cases where the notify checkbox is enabled
# on the person options screen
if not postIsDM and postJsonObject.get('attributedTo'):
attributedTo = postJsonObject['attributedTo']
if not postIsDM and hasObjectDict(postJsonObject):
if postJsonObject['object'].get('attributedTo'):
attributedTo = postJsonObject['object']['attributedTo']
if isinstance(attributedTo, str):
fromNickname = getNicknameFromActor(attributedTo)
fromDomain, fromPort = getDomainFromActor(attributedTo)