feat(backend): watches fire on new, edited and deleted messages and on coming online, legacy keyword included

This commit is contained in:
hh committed 2026-10-19 02:57:27 +00:00
1 parent 8ed9ca1951
commit 4469938f47
12 files changed
+501 -60

No files matched your search

+2 -1
View File
@@ -5,6 +5,7 @@ from userbot.modules.capture.chat_meta import meta_from_chat
from userbot.modules.client import PyroClient
from userbot.modules.stt import is_transcribable
from userbot.modules.stt.gate import safe_transcribe
from userbot.modules.watches.seen import seen_message
from utils.events import notify_bg_event
@@ -20,7 +21,7 @@ async def on_message(client: PyroClient, message: Message) -> None:
):
return
meta = meta_from_chat(message.chat, ctx.contacts.ids)
await ctx.watches.on_text(meta.chat_id, message.id, message.text or message.caption)
await ctx.watches.on_message(seen_message(meta.chat_id, message))
toggles = ctx.resolve(meta)
if not toggles.messages:
return