Update hashtags after processing

main
Bob Mottram 2020-10-25 11:22:52 +00:00
parent a9c07065a0
commit 006908c30c
1 changed files with 18 additions and 17 deletions

View File

@ -596,6 +596,20 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
domainFull = domain + ':' + str(port)
hashtags = item[6]
postId = newPostId.replace('/', '#')
moderated = item[5]
savePost = newswireHashtagProcessing(session, baseDir, blog, hashtags,
httpPrefix, domain, port,
personCache, cachedWebfingers,
federationList,
sendThreads, postLog,
moderated, url)
# save the post and update the index
if savePost:
for tagName in hashtags:
htId = tagName.replace('#', '')
hashtagUrl = \
@ -614,19 +628,6 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
htId + "</span></a>"
blog['object']['content'].replace(tagName, hashtagHtml)
postId = newPostId.replace('/', '#')
moderated = item[5]
savePost = newswireHashtagProcessing(session, baseDir, blog, hashtags,
httpPrefix, domain, port,
personCache, cachedWebfingers,
federationList,
sendThreads, postLog,
moderated, url)
# save the post and update the index
if savePost:
newswire[originalDateStr][6] = hashtags
storeHashTags(baseDir, 'news', blog)