forked from indymedia/epicyon
Remove replaced emoji tags
parent
2361a6d8fd
commit
1d642e0d40
16
posts.py
16
posts.py
|
@ -533,8 +533,20 @@ 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'
|
||||
postCC=httpPrefix+'://'+domain+'/users/'+nickname+'/followers'
|
||||
|
|
Loading…
Reference in New Issue