Bump to v1.2

This commit is contained in:
Dr.Caduceus
2023-11-07 14:53:08 +05:30
committed by GitHub
parent e852210e6e
commit eb40d7e33b

View File

@@ -8,9 +8,9 @@ def verify_user(func: Callable):
@wraps(func)
async def decorator(client: Client, update: Union[Message, CallbackQuery]):
user_id = str(update.from_user.id)
chat_id = str(update.from_user.id if update.from_user else update.chat.id)
if not Telegram.ALLOWED_USER_IDS or user_id in Telegram.ALLOWED_USER_IDS:
if not Telegram.ALLOWED_USER_IDS or chat_id in Telegram.ALLOWED_USER_IDS:
return await func(client, update)
return decorator
return decorator