mirror of https://gitlab.com/bashrc2/epicyon
Don't process content for news posts
parent
eceb96ec49
commit
da18789946
|
@ -146,8 +146,6 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
|
|||
blog['object']['url'] = \
|
||||
httpPrefix + '://' + domain + '/@news/' + statusNumber
|
||||
blog['object']['published'] = dateStr
|
||||
blog['object']['summary'] = rssTitle
|
||||
blog['object']['content'] = rssDescription
|
||||
|
||||
postId = newPostId.replace('/', '#')
|
||||
|
||||
|
|
21
posts.py
21
posts.py
|
@ -727,8 +727,11 @@ def createPostBase(baseDir: str, nickname: str, domain: str, port: int,
|
|||
"""
|
||||
subject = addAutoCW(baseDir, nickname, domain, subject, content)
|
||||
|
||||
mentionedRecipients = \
|
||||
getMentionedPeople(baseDir, httpPrefix, content, domain, False)
|
||||
if nickname != 'news':
|
||||
mentionedRecipients = \
|
||||
getMentionedPeople(baseDir, httpPrefix, content, domain, False)
|
||||
else:
|
||||
mentionedRecipients = ''
|
||||
|
||||
tags = []
|
||||
hashtagsDict = {}
|
||||
|
@ -739,18 +742,20 @@ def createPostBase(baseDir: str, nickname: str, domain: str, port: int,
|
|||
domain = domain + ':' + str(port)
|
||||
|
||||
# add tags
|
||||
content = \
|
||||
addHtmlTags(baseDir, httpPrefix,
|
||||
nickname, domain, content,
|
||||
mentionedRecipients,
|
||||
hashtagsDict, True)
|
||||
if nickname != 'news':
|
||||
content = \
|
||||
addHtmlTags(baseDir, httpPrefix,
|
||||
nickname, domain, content,
|
||||
mentionedRecipients,
|
||||
hashtagsDict, True)
|
||||
|
||||
# replace emoji with unicode
|
||||
tags = []
|
||||
for tagName, tag in hashtagsDict.items():
|
||||
tags.append(tag)
|
||||
# get list of tags
|
||||
content = replaceEmojiFromTags(content, tags, 'content')
|
||||
if nickname != 'news':
|
||||
content = replaceEmojiFromTags(content, tags, 'content')
|
||||
# remove replaced emoji
|
||||
hashtagsDictCopy = hashtagsDict.copy()
|
||||
for tagName, tag in hashtagsDictCopy.items():
|
||||
|
|
Loading…
Reference in New Issue