Remove optional add_mark parameter from .get_peer_id

It was always True after all, and it made no sense for it to
be False.
This commit is contained in:
Lonami Exo
2017-12-28 13:31:43 +01:00
parent 7ed3be8e6f
commit 55b67b65a1
4 changed files with 28 additions and 29 deletions

View File

@@ -17,7 +17,7 @@ class Dialog:
self.message = messages.get(dialog.top_message, None)
self.date = getattr(self.message, 'date', None)
self.entity = entities[utils.get_peer_id(dialog.peer, add_mark=True)]
self.entity = entities[utils.get_peer_id(dialog.peer)]
self.input_entity = utils.get_input_peer(self.entity)
self.name = utils.get_display_name(self.entity)

View File

@@ -285,7 +285,7 @@ class Session:
continue
try:
p = utils.get_input_peer(e, allow_self=False)
marked_id = utils.get_peer_id(p, add_mark=True)
marked_id = utils.get_peer_id(p)
except ValueError:
continue
@@ -327,7 +327,7 @@ class Session:
key = utils.get_input_peer(key)
if type(key).SUBCLASS_OF_ID == 0xc91c90b6: # crc32(b'InputPeer')
return key
key = utils.get_peer_id(key, add_mark=True)
key = utils.get_peer_id(key)
c = self._conn.cursor()
if isinstance(key, str):