Fix usernames not stored in lowercase
This commit is contained in:
parent
5b5fb6cbec
commit
70ae7f0808
@ -455,7 +455,7 @@ class Client:
|
|||||||
self.peers_by_id[user_id] = input_peer
|
self.peers_by_id[user_id] = input_peer
|
||||||
|
|
||||||
if username is not None:
|
if username is not None:
|
||||||
self.peers_by_username[username] = input_peer
|
self.peers_by_username[username.lower()] = input_peer
|
||||||
|
|
||||||
if phone is not None:
|
if phone is not None:
|
||||||
self.peers_by_phone[phone] = input_peer
|
self.peers_by_phone[phone] = input_peer
|
||||||
@ -495,7 +495,7 @@ class Client:
|
|||||||
self.peers_by_id[peer_id] = input_peer
|
self.peers_by_id[peer_id] = input_peer
|
||||||
|
|
||||||
if username is not None:
|
if username is not None:
|
||||||
self.peers_by_username[username] = input_peer
|
self.peers_by_username[username.lower()] = input_peer
|
||||||
|
|
||||||
def download_worker(self):
|
def download_worker(self):
|
||||||
name = threading.current_thread().name
|
name = threading.current_thread().name
|
||||||
@ -889,7 +889,7 @@ class Client:
|
|||||||
else:
|
else:
|
||||||
raise PeerIdInvalid
|
raise PeerIdInvalid
|
||||||
|
|
||||||
self.peers_by_username[username] = input_peer
|
self.peers_by_username[username.lower()] = input_peer
|
||||||
self.peers_by_id[peer_id] = input_peer
|
self.peers_by_id[peer_id] = input_peer
|
||||||
|
|
||||||
return input_peer
|
return input_peer
|
||||||
|
Loading…
Reference in New Issue
Block a user