mirror of https://gitlab.com/bashrc2/epicyon
Check the domain looks like a domain when extracting mentions
parent
470f32382a
commit
072481cc2b
|
@ -130,8 +130,10 @@ def addMention(wordStr: str,httpPrefix: str,following: str,replaceMentions: {},r
|
|||
return True
|
||||
# @nick@domain
|
||||
if '@' in possibleHandle:
|
||||
possibleNickname=possibleHandle.split('@')[0]
|
||||
replaceDomain=possibleHandle.split('@')[1]
|
||||
if not (replaceDomain=='localhost' or '.' in replaceDomain):
|
||||
return False
|
||||
possibleNickname=possibleHandle.split('@')[0]
|
||||
recipientActor=httpPrefix+"://"+replaceDomain+"/users/"+possibleNickname
|
||||
if recipientActor not in recipients:
|
||||
recipients.append(recipientActor)
|
||||
|
|
Loading…
Reference in New Issue