From a2600767d19648dab77405d2d58373e42cf2fb31 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 7 Oct 2022 04:51:56 +0200 Subject: [PATCH] notify ppl when admins add them into CC or disallow them from it --- files/routes/admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 24aee6acf9..fe2469893c 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -318,6 +318,8 @@ def club_allow(v, username): ) g.db.add(ma) + send_repeatable_notification(u.id, f"@{v.username} (admin) has inducted you into the {CC_TITLE}!") + return {"message": f"@{u.username} has been allowed into the {CC_TITLE}!"} @app.post("/@/club_ban") @@ -341,7 +343,9 @@ def club_ban(v, username): ) g.db.add(ma) - return {"message": f"@{u.username} has been kicked from the {CC_TITLE}. Deserved."} + send_repeatable_notification(u.id, f"@{v.username} (admin) has disallowed you from the {CC_TITLE}!") + + return {"message": f"@{u.username} has been disallowed from the {CC_TITLE}. Deserved."} @app.get("/admin/shadowbanned")