mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-02 18:59:53 +00:00
Avoid duplicates
This commit is contained in:
1 parent
e8510d5385
commit
b92f4570a9
2 files changed
+7
-4
No files matched your search
+2
-1
@@ -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
|
||||
+5
-3
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user