From e4734f4ec47d405c7c91d25f8768142249345bc5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 19 Dec 2022 23:44:46 +0200 Subject: [PATCH] fix 2 notifs on same comment --- files/helpers/actions.py | 4 ++-- files/helpers/config/const.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 3d092af681..4f489595d0 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -423,14 +423,14 @@ def execute_blackjack(v, target, body, type): elif type == 'flag': extra_info = f"reports on {target.permalink}" elif type in ('comment', 'message', 'modmail'): - for id in (CARP_ID, IDIO_ID, AEVANN_ID): + for id in (CARP_ID, AEVANN_ID): n = Notification(comment_id=target.id, user_id=id) g.db.add(n) g.db.flush() extra_info = None if extra_info: - for id in (CARP_ID, IDIO_ID, AEVANN_ID): + for id in (CARP_ID, AEVANN_ID): send_repeatable_notification(id, f"Blackjack for @{v.username}: {extra_info}") return False return True diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index b33ae1e086..0a0870e022 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -55,7 +55,7 @@ DEFAULT_RATELIMIT = "3/second;30/minute;200/hour;1000/day" DEFAULT_RATELIMIT_SLOWER = "1/second;30/minute;200/hour;1000/day" DEFAULT_RATELIMIT_USER = DEFAULT_RATELIMIT_SLOWER -PUSH_NOTIF_LIMIT = 1000 # API allows 10 KB but better safe than sorry +PUSH_NOTIF_LIMIT = 1000 IS_LOCALHOST = SITE == "localhost" or SITE == "127.0.0.1" or SITE.startswith("192.168.") or SITE.endswith(".local")