diff --git a/content.py b/content.py
index d25a0bd1..66f387cc 100644
--- a/content.py
+++ b/content.py
@@ -120,7 +120,7 @@ def addMention(wordStr: str,httpPrefix: str,following: str,replaceMentions: {},r
return True
return False
possibleNickname=possibleHandle.split('@')[0]
- possibleDomain=possibleHandle.split('@')[1]
+ possibleDomain=possibleHandle.split('@')[1].strip('\n')
for follow in following:
if follow.replace('\n','')==possibleHandle:
recipientActor=httpPrefix+"://"+possibleDomain+"/users/"+possibleNickname
@@ -130,14 +130,12 @@ def addMention(wordStr: str,httpPrefix: str,following: str,replaceMentions: {},r
return True
# @nick@domain
if '@' in possibleHandle:
- replaceDomain=possibleHandle.split('@')[1]
- if not (replaceDomain=='localhost' or '.' in replaceDomain):
- return False
- possibleNickname=possibleHandle.split('@')[0]
- recipientActor=httpPrefix+"://"+replaceDomain+"/users/"+possibleNickname
+ if not (possibleDomain=='localhost' or '.' in possibleDomain):
+ return False
+ recipientActor=httpPrefix+"://"+possibleDomain+"/users/"+possibleNickname
if recipientActor not in recipients:
recipients.append(recipientActor)
- replaceMentions[wordStr]="@"+possibleNickname+""
+ replaceMentions[wordStr]="@"+possibleNickname+""
return True
return False