Avoid duplicates

main2
Bob Mottram 2019-09-22 18:48:52 +01:00
parent e5993774af
commit e8510d5385
1 changed files with 9 additions and 3 deletions

View File

@ -1264,7 +1264,9 @@ class PubServer(BaseHTTPRequestHandler):
mentionsList=inReplyToUrl.split('?')
for m in mentionsList:
if m.startswith('mention='):
replyToList.append(m.replace('mention=',''))
replyHandle=m.replace('mention=','')
if replyHandle not in replyToList:
replyToList.append(replyHandle)
if m.startswith('page='):
replyPageStr=m.replace('page=','')
if replyPageStr.isdigit():
@ -1281,7 +1283,9 @@ class PubServer(BaseHTTPRequestHandler):
mentionsList=inReplyToUrl.split('?')
for m in mentionsList:
if m.startswith('mention='):
replyToList.append(m.replace('mention=',''))
replyHandle=m.replace('mention=','')
if m.replace('mention=','') not in replyToList:
replyToList.append(replyHandle)
if m.startswith('page='):
replyPageStr=m.replace('page=','')
if replyPageStr.isdigit():
@ -1298,7 +1302,9 @@ class PubServer(BaseHTTPRequestHandler):
mentionsList=inReplyToUrl.split('?')
for m in mentionsList:
if m.startswith('mention='):
replyToList.append(m.replace('mention=',''))
replyHandle=m.replace('mention=','')
if m.replace('mention=','') not in replyToList:
replyToList.append(m.replace('mention=',''))
if m.startswith('page='):
replyPageStr=m.replace('page=','')
if replyPageStr.isdigit():