mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-04 21:50:57 +03:00
Add back _entity_values_to_row
This commit is contained in:
parent
57f50889b0
commit
81f8b7f76e
|
@ -67,6 +67,12 @@ class MemorySession(Session):
|
|||
def delete(self):
|
||||
pass
|
||||
|
||||
def _entity_values_to_row(self, id, hash, username, phone, name):
|
||||
# While this is a simple implementation it might be overrode by,
|
||||
# other classes so they don't need to implement the plural form
|
||||
# of the method. Don't remove.
|
||||
return id, hash, username, phone, name
|
||||
|
||||
def _entity_to_row(self, e):
|
||||
if not isinstance(e, TLObject):
|
||||
return
|
||||
|
@ -96,7 +102,9 @@ class MemorySession(Session):
|
|||
username = username.lower()
|
||||
phone = getattr(e, 'phone', None)
|
||||
name = utils.get_display_name(e) or None
|
||||
return marked_id, p_hash, username, phone, name
|
||||
return self._entity_values_to_row(
|
||||
marked_id, p_hash, username, phone, name
|
||||
)
|
||||
|
||||
def _entities_to_rows(self, tlo):
|
||||
if not isinstance(tlo, TLObject) and utils.is_list_like(tlo):
|
||||
|
|
Loading…
Reference in New Issue
Block a user