feat: web UI chat render, panels, presence + analytics
This commit is contained in:
@@ -3,6 +3,7 @@ from pyrogram.types import Message
|
||||
from userbot import PyroClient
|
||||
from userbot.modules.capture import repository
|
||||
from userbot.modules.capture.repository import CHANNEL_ID_THRESHOLD
|
||||
from utils.events import notify_bg_event
|
||||
|
||||
|
||||
@PyroClient.on_deleted_messages()
|
||||
@@ -21,8 +22,12 @@ async def on_deleted_messages(client: PyroClient, messages: list[Message]) -> No
|
||||
channels.setdefault(chat_id, []).append(message.id)
|
||||
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)
|
||||
for chat_id, ids in channels.items():
|
||||
await repository.mark_deleted_channel(ctx.pool, ctx.account_id, chat_id, ids)
|
||||
await notify_bg_event(
|
||||
ctx.pool, "delete", ctx.account_id, chat_id=chat_id, message_ids=ids
|
||||
)
|
||||
|
||||
|
||||
handlers = on_deleted_messages.handlers
|
||||
|
||||
Reference in New Issue
Block a user