mirror of https://gitlab.com/bashrc2/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]
|
||||
if actorStr.startswith('http') or \
|
||||
actorStr.startswith('dat:'):
|
||||
mentions.append(actorStr)
|
||||
if actorStr not in mentions:
|
||||
mentions.append(actorStr)
|
||||
return mentions
|
||||
|
|
|
@ -934,10 +934,12 @@ def htmlNewPost(translate: {},baseDir: str, \
|
|||
mentionDomain,mentionPort=getDomainFromActor(m)
|
||||
if not mentionDomain:
|
||||
continue
|
||||
if mentionPort:
|
||||
mentionsStr+='@'+mentionNickname+'@'+mentionDomain+':'+str(mentionPort)+' '
|
||||
if mentionPort:
|
||||
mentionsHandle='@'+mentionNickname+'@'+mentionDomain+':'+str(mentionPort)
|
||||
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
|
||||
dropdownNewPostSuffix='/newpost'
|
||||
|
|
Loading…
Reference in New Issue