mirror of https://gitlab.com/bashrc2/epicyon
Notifications should only be for posts written by the selected account
parent
804c045a75
commit
21a9e06c26
11
inbox.py
11
inbox.py
|
@ -2533,10 +2533,13 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
# save the post to file
|
# save the post to file
|
||||||
if saveJson(postJsonObject, destinationFilename):
|
if saveJson(postJsonObject, destinationFilename):
|
||||||
# should we notify that a post from this person has arrived?
|
# should we notify that a post from this person has arrived?
|
||||||
if not postIsDM:
|
# This is for cases where the notify checkbox is enabled
|
||||||
fromNickname = getNicknameFromActor(postJsonObject['actor'])
|
# on the person options screen
|
||||||
fromDomain, fromPort = \
|
if not postIsDM and postJsonObject.get('attributedTo'):
|
||||||
getDomainFromActor(postJsonObject['actor'])
|
attributedTo = postJsonObject['attributedTo']
|
||||||
|
if isinstance(attributedTo, str):
|
||||||
|
fromNickname = getNicknameFromActor(attributedTo)
|
||||||
|
fromDomain, fromPort = getDomainFromActor(attributedTo)
|
||||||
fromDomainFull = getFullDomain(fromDomain, fromPort)
|
fromDomainFull = getFullDomain(fromDomain, fromPort)
|
||||||
if notifyWhenPersonPosts(baseDir, nickname, domain,
|
if notifyWhenPersonPosts(baseDir, nickname, domain,
|
||||||
fromNickname, fromDomainFull):
|
fromNickname, fromDomainFull):
|
||||||
|
|
Loading…
Reference in New Issue