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 announce import createAnnounce
|
||||||
from notifyOnPost import notifyWhenPersonPosts
|
from notifyOnPost import notifyWhenPersonPosts
|
||||||
from conversation import updateConversation
|
from conversation import updateConversation
|
||||||
|
from content import validHashTag
|
||||||
|
|
||||||
|
|
||||||
def storeHashTags(baseDir: str, nickname: str, postJsonObject: {}) -> None:
|
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'):
|
if not tag.get('name'):
|
||||||
continue
|
continue
|
||||||
tagName = tag['name'].replace('#', '').strip()
|
tagName = tag['name'].replace('#', '').strip()
|
||||||
|
if not validHashTag(tagName):
|
||||||
|
continue
|
||||||
tagsFilename = tagsDir + '/' + tagName + '.txt'
|
tagsFilename = tagsDir + '/' + tagName + '.txt'
|
||||||
postUrl = removeIdEnding(postJsonObject['id'])
|
postUrl = removeIdEnding(postJsonObject['id'])
|
||||||
postUrl = postUrl.replace('/', '#')
|
postUrl = postUrl.replace('/', '#')
|
||||||
|
|
Loading…
Reference in New Issue