mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-10-31 01:51:15 +00:00
Don't send bounces to replies to bounces
This commit is contained in:
1 parent
a9de85cb13
commit
cc35f03170
1 file changed
+18
-10
@@ -2365,16 +2365,24 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||
nickname, domain,
|
||||
sendH):
|
||||
# send back a bounce DM
|
||||
if postJsonObject.get('id'):
|
||||
senderPostId = \
|
||||
postJsonObject['id']
|
||||
_bounceDM(senderPostId,
|
||||
session, httpPrefix,
|
||||
baseDir, nickname, domain, port,
|
||||
sendH, federationList,
|
||||
sendThreads, postLog,
|
||||
cachedWebfingers, personCache,
|
||||
translate, debug)
|
||||
if postJsonObject.get('id') and \
|
||||
postJsonObject.get('object'):
|
||||
# don't send bounces back to
|
||||
# replies to bounce messages
|
||||
obj = postJsonObject['object']
|
||||
if isinstance(obj, dict):
|
||||
if not obj.get('inReplyTo'):
|
||||
senderPostId = \
|
||||
postJsonObject['id']
|
||||
_bounceDM(senderPostId,
|
||||
session, httpPrefix,
|
||||
baseDir,
|
||||
nickname, domain, port,
|
||||
sendH, federationList,
|
||||
sendThreads, postLog,
|
||||
cachedWebfingers,
|
||||
personCache,
|
||||
translate, debug)
|
||||
return False
|
||||
|
||||
# dm index will be updated
|
||||
|
||||
Reference in new issue
Block a user