From e8510d53857722437f4bd0948487f651de22be22 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 22 Sep 2019 18:48:52 +0100 Subject: [PATCH] Avoid duplicates --- daemon.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index 7c683ea51..2f3a9661b 100644 --- a/daemon.py +++ b/daemon.py @@ -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():