From cf854d0039bc1836122a2186a2e88441ceb003c2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 4 Oct 2019 11:00:57 +0100 Subject: [PATCH] Comments --- inbox.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/inbox.py b/inbox.py index 59f9b8be9..e291c77e8 100644 --- a/inbox.py +++ b/inbox.py @@ -1337,23 +1337,33 @@ def inboxAfterCapabilities(session,keyId: str,handle: str,messageJson: {}, \ postJson=messageJson if validPostContent(postJson,maxMentions): + # create a DM notification file if needed if isDM(postJson): dmNotify(baseDir,handle) + + # get the actor being replied to 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] + + # create a reply notification file if needed if isReply(postJson,actor): replyNotify(baseDir,handle) + + # get the avatar for a reply/announce obtainAvatarForReplyPost(session,baseDir,httpPrefix,domain,personCache,postJson,debug) + + # save the post to file try: with open(destinationFilename, 'w+') as fp: commentjson.dump(postJson, fp, indent=4, sort_keys=False) except Exception as e: print(e) + # if the post wasn't saved if not os.path.isfile(destinationFilename): return False