Skip to content

Commit

Permalink
Fix authentication bug: Administrators can't chat with the bot privat…
Browse files Browse the repository at this point in the history
…ely when setting GROUP_LIST
  • Loading branch information
yym68686 committed Dec 19, 2023
1 parent 46206c6 commit 6ef7b59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ async def wrapper(*args, **kwargs):
if config.GROUP_LIST == None:
return await func(*args, **kwargs)
if (args[0].effective_chat.id not in config.GROUP_LIST):
if (args[0].effective_user.id in config.ADMIN_LIST and config.ADMIN_LIST):
return await func(*args, **kwargs)
message = (
f"`Hi, {args[0].effective_user.username}!`\n\n"
f"id: `{args[0].effective_user.id}`\n\n"
Expand Down

0 comments on commit 6ef7b59

Please sign in to comment.