Set actor for reply

main2
Bob Mottram 2019-10-03 19:07:45 +01:00
parent 88697ce382
commit 4ca765a41d
1 changed files with 12 additions and 0 deletions

View File

@ -1334,6 +1334,12 @@ def inboxAfterCapabilities(session,keyId: str,handle: str,messageJson: {}, \
if validPostContent(messageJson['post'],maxMentions):
if isDM(messageJson['post']):
dmNotify(baseDir,handle)
domainFull=domain
if port:
if ':' not in domain:
if port!=80 and port!=443:
domainFull=domainFull+':'+str(port)
actor=httpPrefix+'://'+domainFull+'/users/'+handle.split('@')[0]
if isReply(messageJson['post'],actor):
replyNotify(baseDir,handle)
obtainAvatarForReplyPost(session,baseDir,httpPrefix,domain,personCache,messageJson['post'],debug)
@ -1346,6 +1352,12 @@ def inboxAfterCapabilities(session,keyId: str,handle: str,messageJson: {}, \
if validPostContent(messageJson,maxMentions):
if isDM(messageJson):
dmNotify(baseDir,handle)
domainFull=domain
if port:
if ':' not in domain:
if port!=80 and port!=443:
domainFull=domainFull+':'+str(port)
actor=httpPrefix+'://'+domainFull+'/users/'+handle.split('@')[0]
if isReply(messageJson,actor):
replyNotify(baseDir,handle)
obtainAvatarForReplyPost(session,baseDir,httpPrefix,domain,personCache,messageJson,debug)