Extra emoji checks

main
Bob Mottram 2020-02-21 17:45:20 +00:00
parent caf3c31472
commit 691b14a3e7
1 changed files with 7 additions and 6 deletions

View File

@ -62,8 +62,9 @@ def replaceEmojiFromTags(content: str,tag: [],messageType: str) -> str:
continue continue
iconName=tagItem['icon']['url'].split('/')[-1] iconName=tagItem['icon']['url'].split('/')[-1]
if iconName: if iconName:
if iconName.startswith('1'): if len(iconName)>1:
if '.' in iconName: if iconName[0].isdigit():
if '.' in iconName and '-' not in iconName:
iconName=iconName.split('.')[0] iconName=iconName.split('.')[0]
content= \ content= \
content.replace(tagItem['name'], \ content.replace(tagItem['name'], \