mirror of https://gitlab.com/bashrc2/epicyon
Notifications handles
parent
6a73192c24
commit
a68ea9b2a4
13
inbox.py
13
inbox.py
|
@ -2487,8 +2487,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
|
|
||||||
# get the actor being replied to
|
# get the actor being replied to
|
||||||
domainFull = getFullDomain(domain, port)
|
domainFull = getFullDomain(domain, port)
|
||||||
actor = httpPrefix + '://' + domainFull + \
|
actor = httpPrefix + '://' + domainFull + '/users/' + nickname
|
||||||
'/users/' + handle.split('@')[0]
|
|
||||||
|
|
||||||
# create a reply notification file if needed
|
# create a reply notification file if needed
|
||||||
if not postIsDM and isReply(postJsonObject, actor):
|
if not postIsDM and isReply(postJsonObject, actor):
|
||||||
|
@ -2528,12 +2527,14 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
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:
|
if not postIsDM:
|
||||||
handleNickname = handle.split('@')[0]
|
fromNickname = getNicknameFromActor(actor)
|
||||||
handleDomain = handle.split('@')[1]
|
fromDomain, fromPort = getDomainFromActor(actor)
|
||||||
|
fromDomainFull = getFullDomain(fromDomain, fromPort)
|
||||||
|
fromHandle = fromNickname + '@' + fromDomainFull
|
||||||
if notifyWhenPersonPosts(baseDir, nickname, domain,
|
if notifyWhenPersonPosts(baseDir, nickname, domain,
|
||||||
handleNickname, handleDomain):
|
fromNickname, fromDomainFull):
|
||||||
postId = removeIdEnding(postJsonObject['id'])
|
postId = removeIdEnding(postJsonObject['id'])
|
||||||
_notifyPostArrival(baseDir, handle, postId)
|
_notifyPostArrival(baseDir, fromHandle, postId)
|
||||||
|
|
||||||
# If this is a reply to a muted post then also mute it.
|
# If this is a reply to a muted post then also mute it.
|
||||||
# This enables you to ignore a threat that's getting boring
|
# This enables you to ignore a threat that's getting boring
|
||||||
|
|
Loading…
Reference in New Issue