mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Use cache for invite links
This commit is contained in:
@@ -196,9 +196,13 @@ class MemorySession(Session):
|
||||
if phone:
|
||||
result = self.get_entity_rows_by_phone(phone)
|
||||
else:
|
||||
username, _ = utils.parse_username(key)
|
||||
if username:
|
||||
username, invite = utils.parse_username(key)
|
||||
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)
|
||||
|
||||
elif isinstance(key, int):
|
||||
result = self.get_entity_rows_by_id(key, exact)
|
||||
|
Reference in New Issue
Block a user