From 6429b2e26d472ac2a3c2f638b36834389b8bbcaa Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 28 Sep 2024 19:06:50 +0100 Subject: [PATCH] Fix crash on mention on new thread --- app/blueprints/threads/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/blueprints/threads/__init__.py b/app/blueprints/threads/__init__.py index 3c7039c4..28c52c02 100644 --- a/app/blueprints/threads/__init__.py +++ b/app/blueprints/threads/__init__.py @@ -367,7 +367,8 @@ def new(): add_notification(mentioned, current_user, NotificationType.NEW_THREAD, msg, thread.get_view_url(), thread.package) - thread.watchers.append(mentioned) + if mentioned not in thread.watchers: + thread.watchers.append(mentioned) notif_msg = "New thread '{}'".format(thread.title) if package is not None: