mirror of https://gitlab.com/bashrc2/epicyon
Attributed within object
parent
21a9e06c26
commit
7b6c939b92
21
inbox.py
21
inbox.py
|
@ -2535,16 +2535,17 @@ 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 isinstance(attributedTo, str):
|
||||
fromNickname = getNicknameFromActor(attributedTo)
|
||||
fromDomain, fromPort = getDomainFromActor(attributedTo)
|
||||
fromDomainFull = getFullDomain(fromDomain, fromPort)
|
||||
if notifyWhenPersonPosts(baseDir, nickname, domain,
|
||||
fromNickname, fromDomainFull):
|
||||
postId = removeIdEnding(postJsonObject['id'])
|
||||
_notifyPostArrival(baseDir, handle, postId)
|
||||
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)
|
||||
fromDomainFull = getFullDomain(fromDomain, fromPort)
|
||||
if notifyWhenPersonPosts(baseDir, nickname, domain,
|
||||
fromNickname, fromDomainFull):
|
||||
postId = removeIdEnding(postJsonObject['id'])
|
||||
_notifyPostArrival(baseDir, handle, postId)
|
||||
|
||||
# If this is a reply to a muted post then also mute it.
|
||||
# This enables you to ignore a threat that's getting boring
|
||||
|
|
Loading…
Reference in New Issue