diff --git a/files/helpers/const.py b/files/helpers/const.py index abf8f0e8e..c47264dce 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -206,7 +206,7 @@ IDIO_ID = 0 CARP_ID = 0 JOAN_ID = 0 MOOSE_ID = 0 -AEVANN_ID = 5 +AEVANN_ID = 0 SNAKES_ID = 0 HOMO_ID = 0 SOREN_ID = 0 @@ -216,8 +216,6 @@ MOM_ID = 0 DONGER_ID = 0 GEESE_ID = 0 -GIFT_NOTIF_ID = CARP_ID if CARP_ID else AEVANN_ID - BUG_THREAD = 0 POLL_THREAD = 0 WELCOME_MSG = f"Welcome to {SITE_NAME}!" @@ -379,6 +377,10 @@ else: # localhost or testing environment implied FEATURES['HOUSES'] = True FEATURES['REPOST_DETECTION'] = False +if CARP_ID: GIFT_NOTIF_ID = CARP_ID +elif AEVANN_ID: GIFT_NOTIF_ID = AEVANN_ID +else: GIFT_NOTIF_ID = 5 + bots = {AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID, BASEDBOT_ID} IMGUR_KEY = environ.get("IMGUR_KEY").strip() diff --git a/files/routes/static.py b/files/routes/static.py index 445dd676b..89a850f05 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -212,7 +212,7 @@ def submit_contact(v): g.db.flush() new_comment.top_comment_id = new_comment.id - for admin in g.db.query(User).filter(User.admin_level > 2).all(): + for admin in g.db.query(User).filter(User.admin_level > 2, User.id != AEVANN_ID).all(): notif = Notification(comment_id=new_comment.id, user_id=admin.id) g.db.add(notif) diff --git a/files/routes/users.py b/files/routes/users.py index c8fdc48e8..63edd388e 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -789,13 +789,11 @@ def messagereply(v): if c.top_comment.sentto == 2: - admins = [x[0] for x in g.db.query(User.id).filter(User.admin_level > 2, User.id != v.id).all()] + admins = [x[0] for x in g.db.query(User.id).filter(User.admin_level > 2, User.id != v.id, User.id != AEVANN_ID).all()] + if parent.author.id not in admins: admins.append(parent.author.id) - if CARP_ID and AEVANN_ID in admins: - admins.remove(AEVANN_ID) - for admin in admins: notif = Notification(comment_id=c.id, user_id=admin) g.db.add(notif)