From f6b000938ea55fdc6693b3f48e676aafc36a70fb Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sat, 30 Mar 2024 22:26:50 +0100 Subject: [PATCH] Fix username bug --- pyrogram_rockserver_storage/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram_rockserver_storage/__init__.py b/pyrogram_rockserver_storage/__init__.py index 6348ba4..c06570f 100644 --- a/pyrogram_rockserver_storage/__init__.py +++ b/pyrogram_rockserver_storage/__init__.py @@ -45,7 +45,7 @@ def encode_peer_info(access_hash: int, peer_type: str, username: str, phone_numb return {"access_hash": access_hash, "peer_type": peer_type, "username": username, "phone_number": phone_number, "last_update_on": last_update_on} def decode_peer_info(peer_id: int, value): - return {"id": peer_id, "access_hash": value["access_hash"], "peer_type": value["peer_type"]} if value is not None else None + return {"id": peer_id, "access_hash": value["access_hash"], "peer_type": value["peer_type"], "username": value["username"], "phone_number": ["phone_number"], "last_update_on": value["last_update_on"]} if value is not None else None def get_input_peer(peer): """ This function is almost blindly copied from pyrogram sqlite storage"""