fix(backend): userbot follows kurigram 2.2.26, user and chat parsing is awaited, missing chat is handled

This commit is contained in:
hh committed 2026-10-14 03:55:33 +02:00
1 parent d213dfdf64
commit 945adcf879
11 files changed
+13 -11

No files matched your search

@@ -21,10 +21,10 @@ def active_username(usernames: list[raw.types.Username]) -> str | None:
return usernames[0].username if usernames else None
def snapshot_from_user(
async def snapshot_from_user(
client: Client, raw_user: raw.types.User
) -> tuple[ProfileFields, str | None, str | None]:
user = User._parse(client, raw_user) # noqa: SLF001
user = await User._parse(client, raw_user) # noqa: SLF001
photo = user.photo if user else None
photo_unique_id = photo.big_photo_unique_id if photo else None
photo_file_id = photo.big_file_id if photo else None