From 8b77aef0cc555eeaa901d7be6a9a944673a3edb8 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 30 Aug 2023 14:06:27 +0300 Subject: [PATCH] stop "delete my account" spam on wpd --- files/routes/static.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index a8675c0b4..20b1589cd 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -292,8 +292,12 @@ def submit_contact(v): new_comment.top_comment_id = new_comment.id admin_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'])] - if SITE == 'watchpeopledie.tv' and AEVANN_ID in admin_ids: - admin_ids.remove(AEVANN_ID) + + if SITE == 'watchpeopledie.tv': + if AEVANN_ID in admin_ids: + admin_ids.remove(AEVANN_ID) + if 'delete' in new_comment.body.lower() and 'account' in new_comment.body.lower(): + admin_ids = [GTIX_ID] for admin_id in admin_ids: notif = Notification(comment_id=new_comment.id, user_id=admin_id)