From 656a79b6042f6f3b17d645c21ed4ff0d89adc81f Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 13 May 2023 08:01:30 +0300 Subject: [PATCH] dont show duplicate results in /search/messages --- files/routes/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/search.py b/files/routes/search.py index ae857af9a..8cfc31944 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -353,7 +353,7 @@ def searchmessages(v:User): for x in comments: x.unread = True - comments = [x.top_comment for x in comments] + comments = dict.fromkeys([x.top_comment for x in comments]) if v.client: return {"total":total, "data":[x.json(db=g.db) for x in comments]} return render_template("search_comments.html", v=v, query=query, page=page, comments=comments, sort=sort, t=t, total=total, standalone=True, render_replies=True)