mirror of https://gitlab.com/bashrc2/epicyon
Validate hashtag name
parent
e8c1091ea8
commit
d3fc9ee45e
3
inbox.py
3
inbox.py
|
@ -97,6 +97,7 @@ from announce import isSelfAnnounce
|
|||
from announce import createAnnounce
|
||||
from notifyOnPost import notifyWhenPersonPosts
|
||||
from conversation import updateConversation
|
||||
from content import validHashTag
|
||||
|
||||
|
||||
def storeHashTags(baseDir: str, nickname: str, postJsonObject: {}) -> None:
|
||||
|
@ -132,6 +133,8 @@ def storeHashTags(baseDir: str, nickname: str, postJsonObject: {}) -> None:
|
|||
if not tag.get('name'):
|
||||
continue
|
||||
tagName = tag['name'].replace('#', '').strip()
|
||||
if not validHashTag(tagName):
|
||||
continue
|
||||
tagsFilename = tagsDir + '/' + tagName + '.txt'
|
||||
postUrl = removeIdEnding(postJsonObject['id'])
|
||||
postUrl = postUrl.replace('/', '#')
|
||||
|
|
Loading…
Reference in New Issue