diff --git a/files/helpers/const.py b/files/helpers/const.py index 851f88b49..924177c4d 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -275,6 +275,7 @@ elif SITE == 'pcmemes.net': KIPPY_ID = 1592 GIFT_NOTIF_ID = 1592 + CARP_ID = 13 AEVANN_ID = 1 SNAKES_ID = 2279 @@ -293,8 +294,8 @@ elif SITE == 'cringetopia.org': LONGPOSTBOT_ID = 4 ZOZBOT_ID = 5 - GIFT_NOTIF_ID = 18 - CARP_ID = 18 + GIFT_NOTIF_ID = 9 + CARP_ID = 43 AEVANN_ID = 9 SNAKES_ID = 3284 @@ -327,7 +328,7 @@ elif SITE == 'watchpeopledie.co': ZOZBOT_ID = 5 GIFT_NOTIF_ID = 9 - CARP_ID = 9 + CARP_ID = 48 AEVANN_ID = 9 SNAKES_ID = 32 elif SITE == 'lgbdropthet.com': @@ -346,6 +347,7 @@ elif SITE == 'lgbdropthet.com': LONGPOSTBOT_ID = 4 ZOZBOT_ID = 5 + CARP_ID = 17 AEVANN_ID = 10 SNAKES_ID = 9 diff --git a/files/routes/chat.py b/files/routes/chat.py index df11fbe77..5a623034b 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -68,6 +68,7 @@ def speak(data, v): v.shadowbanned = 'AutoJanny' g.db.add(v) send_repeatable_notification(CARP_ID, f"{v.username} has been shadowbanned because of a chat message.") + send_repeatable_notification(CARP_ID, f"{v.username} has been shadowbanned because of a chat message.") else: emit('speak', data, broadcast=True) messages.append(data) diff --git a/files/routes/comments.py b/files/routes/comments.py index 88ad9479f..91207a22a 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -362,6 +362,8 @@ def api_comment(v): v.shadowbanned = 'AutoJanny' notif = Notification(comment_id=c.id, user_id=CARP_ID) g.db.add(notif) + notif = Notification(comment_id=c.id, user_id=AEVANN_ID) + g.db.add(notif) if c.level == 1: c.top_comment_id = c.id else: c.top_comment_id = parent.top_comment_id @@ -732,6 +734,10 @@ def edit_comment(cid, v): if not notif: notif = Notification(comment_id=c.id, user_id=CARP_ID) g.db.add(notif) + notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=AEVANN_ID).one_or_none() + if not notif: + notif = Notification(comment_id=c.id, user_id=AEVANN_ID) + g.db.add(notif) if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower() and not c.is_banned: diff --git a/files/routes/posts.py b/files/routes/posts.py index fa714b9e7..1226a5957 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -443,6 +443,7 @@ def edit_post(pid, v): v.shadowbanned = 'AutoJanny' g.db.add(v) send_repeatable_notification(CARP_ID, p.permalink) + send_repeatable_notification(AEVANN_ID, p.permalink) if len(body_html) > 40000: return {"error":"Submission body_html too long! (max 40k characters)"}, 400 @@ -940,6 +941,7 @@ def submit_post(v, sub=None): v.shadowbanned = 'AutoJanny' g.db.add(v) send_repeatable_notification(CARP_ID, post.permalink) + send_repeatable_notification(AEVANN_ID, post.permalink) if v and v.admin_level > 2: for option in bet_options: diff --git a/files/routes/reporting.py b/files/routes/reporting.py index c9ae7b1cd..53fcf3e0e 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -19,6 +19,7 @@ def api_flag_post(pid, v): if blackjack and any(i in reason.lower() for i in blackjack.split()): v.shadowbanned = 'AutoJanny' send_repeatable_notification(CARP_ID, f"reports on {post.permalink}") + send_repeatable_notification(AEVANN_ID, f"reports on {post.permalink}") reason = reason[:100] @@ -89,6 +90,7 @@ def api_flag_comment(cid, v): if blackjack and any(i in reason.lower() for i in blackjack.split()): v.shadowbanned = 'AutoJanny' send_repeatable_notification(CARP_ID, f"reports on {comment.permalink}") + send_repeatable_notification(AEVANN_ID, f"reports on {comment.permalink}") reason = reason[:100] diff --git a/files/routes/users.py b/files/routes/users.py index 4fd87b4bb..df3c82c83 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -671,6 +671,11 @@ def message2(v, username): notif = Notification(comment_id=c.id, user_id=CARP_ID) g.db.add(notif) g.db.flush() + notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=AEVANN_ID).one_or_none() + if not notif: + notif = Notification(comment_id=c.id, user_id=AEVANN_ID) + g.db.add(notif) + g.db.flush() c.top_comment_id = c.id @@ -743,6 +748,11 @@ def messagereply(v): notif = Notification(comment_id=c.id, user_id=CARP_ID) g.db.add(notif) g.db.flush() + notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=AEVANN_ID).one_or_none() + if not notif: + notif = Notification(comment_id=c.id, user_id=AEVANN_ID) + g.db.add(notif) + g.db.flush() if user_id and user_id not in (v.id, 2, bots): notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=user_id).one_or_none()