forked from rDrama/rDrama
make it so ppl u muted or blocked cant add u to chats
parent
99274ee930
commit
0f13ea3b54
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue