From 5200c8ee0f3ed425e027e77575d00235fae2c247 Mon Sep 17 00:00:00 2001 From: Eikosa Date: Sat, 1 Jun 2024 19:53:22 +0300 Subject: [PATCH] Fix for: Invalid peer type: group --- hydrogram/storage/sqlite_storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydrogram/storage/sqlite_storage.py b/hydrogram/storage/sqlite_storage.py index 9ee6093cd..98dcccde1 100644 --- a/hydrogram/storage/sqlite_storage.py +++ b/hydrogram/storage/sqlite_storage.py @@ -78,7 +78,7 @@ def get_input_peer(peer_id: int, access_hash: int, peer_type: str) -> InputPeer: if peer_type in {"user", "bot"}: return raw.types.InputPeerUser(user_id=peer_id, access_hash=access_hash) - if peer_type == ChatType.GROUP: + if peer_type == "group": return raw.types.InputPeerChat(chat_id=-peer_id) if peer_type in {"channel", "supergroup"}: return raw.types.InputPeerChannel(