From 0f7c2b891a949402f1b29d0fcf449d245eda2138 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 15 Nov 2018 17:23:47 +0100 Subject: [PATCH] Fix get entity by exact name since 2ca8ddb --- telethon/sessions/memory.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telethon/sessions/memory.py b/telethon/sessions/memory.py index edd662af..09f029ed 100644 --- a/telethon/sessions/memory.py +++ b/telethon/sessions/memory.py @@ -202,9 +202,9 @@ class MemorySession(Session): if username and not invite: result = self.get_entity_rows_by_username(username) else: - key = utils.resolve_invite_link(key)[1] - if key: - result = self.get_entity_rows_by_id(key, exact=False) + tup = utils.resolve_invite_link(key)[1] + if tup: + result = self.get_entity_rows_by_id(tup, exact=False) elif isinstance(key, int): result = self.get_entity_rows_by_id(key, exact)