From 79479d9ffd2f642781ecaa7e514024bc0e2c1a6c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 27 Jun 2022 21:13:19 +0200 Subject: [PATCH] make it so u dont get pinged by ur own comment on a subscribed thread --- files/routes/comments.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 06c1884dd..837f29b89 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -554,7 +554,9 @@ def api_comment(v): notify_users = NOTIFY_USERS(body, v) if c.level == 1: - for x in g.db.query(Subscription.user_id).filter_by(submission_id=c.parent_submission).all(): + subscribers = g.db.query(Subscription.user_id).filter(Subscription.submission_id == c.parent_submission, Subscription.user_id != v.id).all() + + for x in subscribers: notify_users.add(x[0]) if parent.author.id != v.id: