Avoid announce inbox double entry

main
Bob Mottram 2021-09-04 19:26:08 +01:00
parent 20273b0c91
commit 851accdb3e
1 changed files with 1 additions and 9 deletions

View File

@ -90,7 +90,6 @@ from posts import createDirectMessagePost
from posts import populateRepliesJson from posts import populateRepliesJson
from posts import addToField from posts import addToField
from posts import expireCache from posts import expireCache
from inbox import inboxUpdateIndex
from inbox import clearQueueItems from inbox import clearQueueItems
from inbox import inboxPermittedMessage from inbox import inboxPermittedMessage
from inbox import inboxMessageHasParams from inbox import inboxMessageHasParams
@ -6740,18 +6739,11 @@ class PubServer(BaseHTTPRequestHandler):
# save the announce straight to the outbox # save the announce straight to the outbox
# This is because the subsequent send is within a separate thread # This is because the subsequent send is within a separate thread
# but the html still needs to be generated before this call ends # but the html still needs to be generated before this call ends
# announceId = removeIdEnding(announceJson['id']) announceId = removeIdEnding(announceJson['id'])
announceId = announceJson['id']
announceFilename = \ announceFilename = \
savePostToBox(baseDir, httpPrefix, announceId, savePostToBox(baseDir, httpPrefix, announceId,
self.postToNickname, domainFull, self.postToNickname, domainFull,
announceJson, 'outbox') announceJson, 'outbox')
# also copy the post id to the inbox index
indexes = ['inbox']
for boxNameIndex in indexes:
inboxUpdateIndex(boxNameIndex, baseDir,
self.postToNickname + '@' + domain,
announceFilename, debug)
# clear the icon from the cache so that it gets updated # clear the icon from the cache so that it gets updated
if self.server.iconsCache.get('repeat.png'): if self.server.iconsCache.get('repeat.png'):