Avoid inbox duplicates when sending posts to self

This commit is contained in:
bashrc committed 2020-05-17 13:27:07 +00:00
1 parent 34e811f87d
commit 52679a8491
1 file changed
+11 -3
+11 -3
View File
@@ -194,9 +194,17 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str,
for boxNameIndex in indexes:
if boxNameIndex == 'inbox' and outboxName == 'tlblogs':
continue
inboxUpdateIndex(boxNameIndex, baseDir,
postToNickname + '@' + domain,
savedFilename, debug)
selfActor = \
httpPrefix + '://' + domainFull + \
'/users/' + postToNickname
# avoid duplicates of the message if already going
# back to the inbox of the same account
if selfActor not in messageJson['to']:
# show sent post within the inbox,
# as is the typical convention
inboxUpdateIndex(boxNameIndex, baseDir,
postToNickname + '@' + domain,
savedFilename, debug)
if outboxAnnounce(recentPostsCache,
baseDir, messageJson, debug):
if debug: