From 30dd9bc5d52376914d9fa784d45aa59bb975c958 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 20 Jan 2023 02:12:36 +0200 Subject: [PATCH] restore chat for rdrama --- files/helpers/config/const.py | 1 - files/routes/chat.py | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 3a6fbeb98..d8d054f3f 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -679,7 +679,6 @@ if SITE == 'rdrama.net': FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True FEATURES['ASSET_SUBMISSIONS'] = True PERMS['ADMIN_ADD'] = 4 - PERMS['CHAT'] = 3 SIDEBAR_THREAD = 37696 BANNER_THREAD = 37697 diff --git a/files/routes/chat.py b/files/routes/chat.py index a6f8e1116..666e192ae 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -106,17 +106,17 @@ def speak(data, v): typing = [] - if SITE == 'rdrama.net': - title = f'New chat message from @{v.username}' - notifbody = text - url = f'{SITE_FULL}/chat' + # if SITE == 'rdrama.net': + # title = f'New chat message from @{v.username}' + # notifbody = text + # url = f'{SITE_FULL}/chat' - admin_ids = [x[0] for x in g.db.query(User.id).filter( - User.id != v.id, - User.admin_level >= PERMS['CHAT'], - ).all()] + # admin_ids = [x[0] for x in g.db.query(User.id).filter( + # User.id != v.id, + # User.admin_level >= PERMS['CHAT'], + # ).all()] - push_notif(admin_ids, title, notifbody, url) + # push_notif(admin_ids, title, notifbody, url) return '', 204