forked from rDrama/rDrama
1
0
Fork 0

remove unnecessary var

master
Aevann 2024-03-10 21:43:26 +02:00
parent 725ec63df7
commit e1a37706b6
1 changed files with 2 additions and 3 deletions

View File

@ -138,9 +138,8 @@ 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 and not user.has_muted(v) and not user.has_blocked(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()
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()
if not existing and not leave:
chat_membership = ChatMembership(
user_id=user.id,