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

+1 -1
View File
@@ -30,4 +30,4 @@ async def on_deleted_messages(client: PyroClient, messages: list[Message]) -> No
)
handlers = on_deleted_messages.handlers
handlers = on_deleted_messages.handlers # ty: ignore[unresolved-attribute]
+1 -1
View File
@@ -49,4 +49,4 @@ async def on_edited_message(client: PyroClient, message: Message) -> None:
)
handlers = on_edited_message.handlers
handlers = on_edited_message.handlers # ty: ignore[unresolved-attribute]
+1 -1
View File
@@ -36,4 +36,4 @@ async def on_message(client: PyroClient, message: Message) -> None:
await safe_transcribe(client, ctx, meta.chat_id, message.id)
handlers = on_message.handlers
handlers = on_message.handlers # ty: ignore[unresolved-attribute]
+1 -1
View File
@@ -27,4 +27,4 @@ async def on_user_status(client: PyroClient, user: User) -> None:
await notify_bg_event(ctx.pool, "presence", ctx.account_id, chat_id=user.id)
handlers = on_user_status.handlers
handlers = on_user_status.handlers # ty: ignore[unresolved-attribute]
@@ -38,4 +38,4 @@ async def dispatch(
await handler(client, update, users, chats)
handlers = dispatch.handlers
handlers = dispatch.handlers # ty: ignore[unresolved-attribute]
+1 -1
View File
@@ -21,7 +21,7 @@ async def _handle_user(
raw_user = users.get(update.user_id)
if raw_user is None:
return
fields, photo_file_id, photo_unique_id = snapshot_from_user(client, raw_user)
fields, photo_file_id, photo_unique_id = await snapshot_from_user(client, raw_user)
current = await get_peer(ctx.pool, ctx.account_id, update.user_id)
if current == fields:
return
+1 -1
View File
@@ -11,4 +11,4 @@ async def on_story(client: PyroClient, story: Story) -> None:
await save_story(client, client.capture, story)
handlers = on_story.handlers
handlers = on_story.handlers # ty: ignore[unresolved-attribute]