fix 2 notifs on same comment
parent
3fa6e4d020
commit
e4734f4ec4
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue