1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #1216 from SwissCorePy/master

fixed bug
This commit is contained in:
Badiboy 2021-07-01 20:04:37 +03:00 committed by GitHub
commit 47dd84c441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,10 +158,9 @@ class ChatMemberUpdated(JsonDeserializable):
"""
old: Dict = self.old_chat_member.__dict__
new: Dict = self.new_chat_member.__dict__
old.pop('user') # User should always be the same
new.pop('user') # No need to include
dif = {}
for key in new:
if key == 'user': continue
if new[key] != old[key]:
dif[key] = [old[key], new[key]]
return dif