fix modmail I hope

pull/83/head
Aevann1 2022-12-20 02:51:09 +02:00
parent bee14957a7
commit 4b5647993c
1 changed files with 5 additions and 1 deletions

View File

@ -416,13 +416,17 @@ def execute_blackjack(v, target, body, type):
elif hasattr(target, 'is_banned'):
target.is_banned = True
extra_info = "unknown entity"
if type == 'submission':
extra_info = target.permalink
elif type == 'chat':
extra_info = "chat message"
elif type == 'flag':
extra_info = f"reports on {target.permalink}"
elif type in ('comment', 'message', 'modmail'):
elif type == 'modmail':
extra_info = "modmail"
elif type in ('comment', 'message'):
for id in (CARP_ID, AEVANN_ID):
n = Notification(comment_id=target.id, user_id=id)
g.db.add(n)