Fix EntityDatabase failing to cache self user

This commit is contained in:
Lonami Exo
2017-10-05 13:14:54 +02:00
parent 4f2a44231a
commit 1fb3d0d00c
2 changed files with 5 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ class EntityDatabase:
continue
try:
p = utils.get_input_peer(e)
p = utils.get_input_peer(e, allow_self=False)
new_input[utils.get_peer_id(p, add_mark=True)] = \
getattr(p, 'access_hash', 0) # chats won't have hash
@@ -93,7 +93,7 @@ class EntityDatabase:
"full" means simply not "Input*".
"""
marked_id = utils.get_peer_id(
utils.get_input_peer(entity), add_mark=True
utils.get_input_peer(entity, allow_self=False), add_mark=True
)
try:
old_entity = self._entities[marked_id]