From 87d0a14b37d643010243dfc572d2e69d8b98a36c Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 5 Aug 2023 13:27:03 +0300 Subject: [PATCH] notify ppl when they're muted or unmuted --- files/routes/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index 38f81b1b5..c07325700 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1238,6 +1238,8 @@ def mute_user(v, user_id): g.db.add(ma) check_for_alts(user) + send_repeatable_notification(user.id, f"@{v.username} (a site admin) has muted you!") + return {"message": f"@{user.username} has been muted!"} @@ -1265,6 +1267,8 @@ def unmute_user(v, user_id): x.is_muted = False g.db.add(x) + send_repeatable_notification(user.id, f"@{v.username} (a site admin) has unmuted you!") + return {"message": f"@{user.username} has been unmuted!"} @app.post("/admin/progstack/post/")