forked from indymedia/epicyon
Store hashtags on incoming news posts
parent
37fee435ec
commit
ae3b7819c3
|
@ -19,6 +19,7 @@ from content import validHashTag
|
||||||
from utils import loadJson
|
from utils import loadJson
|
||||||
from utils import saveJson
|
from utils import saveJson
|
||||||
from utils import getStatusNumber
|
from utils import getStatusNumber
|
||||||
|
from inbox import storeHashTags
|
||||||
|
|
||||||
|
|
||||||
def updateFeedsOutboxIndex(baseDir: str, domain: str, postId: str) -> None:
|
def updateFeedsOutboxIndex(baseDir: str, domain: str, postId: str) -> None:
|
||||||
|
@ -235,6 +236,7 @@ def newswireHashtagProcessing(session, baseDir: str, postJsonObject: {},
|
||||||
else:
|
else:
|
||||||
content += hashtagHtml
|
content += hashtagHtml
|
||||||
postJsonObject['object']['content'] = content
|
postJsonObject['object']['content'] = content
|
||||||
|
storeHashTags(baseDir, 'news', postJsonObject)
|
||||||
actionOccurred = True
|
actionOccurred = True
|
||||||
|
|
||||||
# remove a hashtag
|
# remove a hashtag
|
||||||
|
@ -390,6 +392,9 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
|
||||||
# save the post and update the index
|
# save the post and update the index
|
||||||
if savePost:
|
if savePost:
|
||||||
newswire[originalDateStr][6] = hashtags
|
newswire[originalDateStr][6] = hashtags
|
||||||
|
|
||||||
|
storeHashTags(baseDir, 'news', blog)
|
||||||
|
|
||||||
if saveJson(blog, filename):
|
if saveJson(blog, filename):
|
||||||
updateFeedsOutboxIndex(baseDir, domain, postId + '.json')
|
updateFeedsOutboxIndex(baseDir, domain, postId + '.json')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue