Add index after generating post html

main
Bob Mottram 2021-11-05 10:26:20 +00:00
parent 8b7360a7d0
commit 0dd0d1a649
1 changed files with 4 additions and 3 deletions

View File

@ -2574,9 +2574,6 @@ def _receiveQuestionVote(baseDir: str, nickname: str, domain: str,
return return
removePostFromCache(questionJson, recentPostsCache) removePostFromCache(questionJson, recentPostsCache)
# add id to inbox index
inboxUpdateIndex('inbox', baseDir, handle,
questionPostFilename, debug)
# ensure that the cached post is removed if it exists, so # ensure that the cached post is removed if it exists, so
# that it then will be recreated # that it then will be recreated
cachedPostFilename = \ cachedPostFilename = \
@ -2615,6 +2612,10 @@ def _receiveQuestionVote(baseDir: str, nickname: str, domain: str,
False, True, False, CWlists, False, True, False, CWlists,
listsEnabled) listsEnabled)
# add id to inbox index
inboxUpdateIndex('inbox', baseDir, handle,
questionPostFilename, debug)
# Is this a question created by this instance? # Is this a question created by this instance?
idPrefix = httpPrefix + '://' + domain idPrefix = httpPrefix + '://' + domain
if not questionJson['object']['id'].startswith(idPrefix): if not questionJson['object']['id'].startswith(idPrefix):