From 0f13ea3b545c9b6d73276a6f5becc3209166ce29 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 10 Mar 2024 20:26:42 +0200 Subject: [PATCH] make it so ppl u muted or blocked cant add u to chats --- files/routes/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/chat.py b/files/routes/chat.py index 9abd86b193..c3dbd8a639 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -137,7 +137,7 @@ def speak(data, v): if v.id == chat.owner_id and chat_adding_regex.fullmatch(text): user = get_user(text[2:], graceful=True, attributes=[User.id]) - if user: + if user and not user.has_muted(v) and not user.has_muted(v): user_id = user.id existing = g.db.query(ChatMembership.user_id).filter_by(user_id=user_id, chat_id=chat_id).one_or_none() leave = g.db.query(ChatLeave.user_id).filter_by(user_id=user_id, chat_id=chat_id).one_or_none()