Include "chat" attribute in processing entities (#3133)

Requests like checkChatInvite return a chatInviteAlready, which has
a "chat" attribute similar to the "user" attribute other requests have.
This commit is contained in:
painor 2021-08-29 10:50:48 +01:00 committed by GitHub
parent 9830c4e02b
commit 828cf2dcad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,6 +130,8 @@ class MemorySession(Session):
entities = [] entities = []
if hasattr(tlo, 'user'): if hasattr(tlo, 'user'):
entities.append(tlo.user) entities.append(tlo.user)
if hasattr(tlo, 'chat'):
entities.append(tlo.chat)
if hasattr(tlo, 'chats') and utils.is_list_like(tlo.chats): if hasattr(tlo, 'chats') and utils.is_list_like(tlo.chats):
entities.extend(tlo.chats) entities.extend(tlo.chats)
if hasattr(tlo, 'users') and utils.is_list_like(tlo.users): if hasattr(tlo, 'users') and utils.is_list_like(tlo.users):