fix(userbot): a deletion that arrives before its message is applied once the message is stored
This commit is contained in:
1 parent
516b8e307f
commit
f32b772ddc
5 files changed
+56
No files matched your search
@@ -20,6 +20,9 @@ async def on_deleted_messages(client: PyroClient, messages: list[Message]) -> No
|
||||
box.append(message.id)
|
||||
else:
|
||||
channels.setdefault(chat_id, []).append(message.id)
|
||||
ctx.pending_deletes.remember(None, box)
|
||||
for chat_id, ids in channels.items():
|
||||
ctx.pending_deletes.remember(chat_id, ids)
|
||||
if box:
|
||||
await repository.mark_deleted_box(ctx.pool, ctx.account_id, box)
|
||||
await notify_bg_event(ctx.pool, "delete", ctx.account_id, message_ids=box)
|
||||
|
||||
Reference in new issue
Block a user