From f4ea662fdd7b60d05aaabc60ebe3aaca54ec798d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 2 Aug 2018 19:40:48 +0200 Subject: [PATCH] Fix sign in not saving self user to session file --- telethon/sessions/memory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/telethon/sessions/memory.py b/telethon/sessions/memory.py index a786316d..2bc973aa 100644 --- a/telethon/sessions/memory.py +++ b/telethon/sessions/memory.py @@ -122,6 +122,8 @@ class MemorySession(Session): entities = tlo else: entities = [] + if hasattr(tlo, 'user'): + entities.append(tlo.user) if hasattr(tlo, 'chats') and utils.is_list_like(tlo.chats): entities.extend(tlo.chats) if hasattr(tlo, 'users') and utils.is_list_like(tlo.users):