Skip to content

Commit

Permalink
Merge pull request #4 from kkren/master
Browse files Browse the repository at this point in the history
fix listen on permission change
  • Loading branch information
NimaQu authored Dec 19, 2021
2 parents 07bc6d8 + 3aeb6d1 commit 4d7b71b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ async def leave_command(client: Client, message: Message):

@app.on_chat_member_updated()
async def challenge_user(client: Client, message: ChatMemberUpdated):
# filter out chat member left message
if not bool(message.new_chat_member):
# Only listen on new user enter
if not bool(message.new_chat_member) or bool(message.old_chat_member):
return
target = message.new_chat_member.user
group_config = _config.get(str(message.chat.id), _config["*"])
Expand Down

0 comments on commit 4d7b71b

Please sign in to comment.