Don't send bounces to replies to bounces

main
Bob Mottram 2021-02-24 11:09:53 +00:00
parent a9de85cb13
commit cc35f03170
1 changed files with 18 additions and 10 deletions

View File

@ -2365,16 +2365,24 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
nickname, domain, nickname, domain,
sendH): sendH):
# send back a bounce DM # send back a bounce DM
if postJsonObject.get('id'): if postJsonObject.get('id') and \
senderPostId = \ postJsonObject.get('object'):
postJsonObject['id'] # don't send bounces back to
_bounceDM(senderPostId, # replies to bounce messages
session, httpPrefix, obj = postJsonObject['object']
baseDir, nickname, domain, port, if isinstance(obj, dict):
sendH, federationList, if not obj.get('inReplyTo'):
sendThreads, postLog, senderPostId = \
cachedWebfingers, personCache, postJsonObject['id']
translate, debug) _bounceDM(senderPostId,
session, httpPrefix,
baseDir,
nickname, domain, port,
sendH, federationList,
sendThreads, postLog,
cachedWebfingers,
personCache,
translate, debug)
return False return False
# dm index will be updated # dm index will be updated