forked from indymedia/epicyon
Remove replaced emoji tags
parent
2361a6d8fd
commit
1d642e0d40
14
posts.py
14
posts.py
|
@ -533,7 +533,19 @@ def createPostBase(baseDir: str,nickname: str,domain: str,port: int, \
|
|||
nickname,domain,content, \
|
||||
mentionedRecipients, \
|
||||
hashtagsDict,True)
|
||||
content=replaceEmojiFromTags(content,mentionedRecipients,'content')
|
||||
|
||||
# replace emoji with unicode
|
||||
tags=[]
|
||||
for tagName,tag in hashtagsDict.items():
|
||||
tags.append(tag)
|
||||
# get list of tags
|
||||
content=replaceEmojiFromTags(content,tags,'content')
|
||||
# remove replaced emoji
|
||||
for tagName,tag in hashtagsDict.items():
|
||||
if tag.get('name'):
|
||||
if tag['name'].startswith(':'):
|
||||
if tag['name'] not in content:
|
||||
del hashtagsDict[tagName]
|
||||
|
||||
statusNumber,published = getStatusNumber()
|
||||
postTo='https://www.w3.org/ns/activitystreams#Public'
|
||||
|
|
Loading…
Reference in New Issue