forked from indymedia/epicyon
Avoid duplicates
parent
e8510d5385
commit
b92f4570a9
|
@ -284,5 +284,6 @@ def getMentionsFromHtml(htmlText: str,matchStr="<span class=\"h-card\"><a href=\
|
||||||
actorStr=mentionStr.split('"')[0]
|
actorStr=mentionStr.split('"')[0]
|
||||||
if actorStr.startswith('http') or \
|
if actorStr.startswith('http') or \
|
||||||
actorStr.startswith('dat:'):
|
actorStr.startswith('dat:'):
|
||||||
mentions.append(actorStr)
|
if actorStr not in mentions:
|
||||||
|
mentions.append(actorStr)
|
||||||
return mentions
|
return mentions
|
||||||
|
|
|
@ -934,10 +934,12 @@ def htmlNewPost(translate: {},baseDir: str, \
|
||||||
mentionDomain,mentionPort=getDomainFromActor(m)
|
mentionDomain,mentionPort=getDomainFromActor(m)
|
||||||
if not mentionDomain:
|
if not mentionDomain:
|
||||||
continue
|
continue
|
||||||
if mentionPort:
|
if mentionPort:
|
||||||
mentionsStr+='@'+mentionNickname+'@'+mentionDomain+':'+str(mentionPort)+' '
|
mentionsHandle='@'+mentionNickname+'@'+mentionDomain+':'+str(mentionPort)
|
||||||
else:
|
else:
|
||||||
mentionsStr+='@'+mentionNickname+'@'+mentionDomain+' '
|
mentionsHandle='@'+mentionNickname+'@'+mentionDomain
|
||||||
|
if mentionsHandle not in mentionsStr:
|
||||||
|
mentionsStr+=mentionsHandle+' '
|
||||||
|
|
||||||
# build suffixes so that any replies or mentions are preserved when switching between scopes
|
# build suffixes so that any replies or mentions are preserved when switching between scopes
|
||||||
dropdownNewPostSuffix='/newpost'
|
dropdownNewPostSuffix='/newpost'
|
||||||
|
|
Loading…
Reference in New Issue