remove duplicate message

master
justcool393 2022-10-20 19:31:03 -05:00
parent 790a569072
commit 37af363a47
1 changed files with 2 additions and 4 deletions

View File

@ -364,10 +364,9 @@ def execute_blackjack(v, target, body, type):
if not v.is_banned: v.ban_reason = f"Blackjack" if not v.is_banned: v.ban_reason = f"Blackjack"
g.db.add(v) g.db.add(v)
notif = None notif = None
extra_info = None extra_info = "unknown entity"
if type == 'submission': if type == 'submission':
extra_info = f"submission ({target.permalink})" extra_info = f"submission ({target.permalink})"
send_repeatable_notification(CARP_ID, target.permalink)
elif type == 'comment' or type == 'message': elif type == 'comment' or type == 'message':
extra_info = f"{type} ({target.permalink})" extra_info = f"{type} ({target.permalink})"
notif = Notification(comment_id=target.id, user_id=CARP_ID) notif = Notification(comment_id=target.id, user_id=CARP_ID)
@ -375,8 +374,7 @@ def execute_blackjack(v, target, body, type):
extra_info = "chat message" extra_info = "chat message"
elif type == 'flag': elif type == 'flag':
extra_info = f"reports on {target.permalink}" extra_info = f"reports on {target.permalink}"
else:
extra_info = "unknown entity"
if notif: if notif:
g.db.add(notif) g.db.add(notif)
g.db.flush() g.db.flush()