feat(backend): watches fire on new, edited and deleted messages and on coming online, legacy keyword included
This commit is contained in:
1 parent
8ed9ca1951
commit
4469938f47
12 files changed
+501
-60
No files matched your search
@@ -5,6 +5,7 @@ from userbot.modules.capture.chat_meta import meta_from_chat
|
||||
from userbot.modules.capture.message import message_row
|
||||
from userbot.modules.client import PyroClient
|
||||
from userbot.modules.media import capture_media
|
||||
from userbot.modules.watches.seen import seen_message
|
||||
from utils.events import notify_bg_event
|
||||
|
||||
|
||||
@@ -22,6 +23,7 @@ async def on_edited_message(client: PyroClient, message: Message) -> None:
|
||||
chat = message.chat
|
||||
chat_id = chat.id or 0
|
||||
meta = meta_from_chat(chat, ctx.contacts.ids)
|
||||
await ctx.watches.on_edit(seen_message(chat_id, message))
|
||||
toggles = ctx.resolve(meta)
|
||||
if not toggles.track_edits_deletes:
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user