feat: log presence, read receipts, group leaves, links, profiles, stories

This commit is contained in:
h
2026-05-29 22:13:59 +02:00
parent bfd16ab02c
commit bcb94b6474
31 changed files with 1298 additions and 19 deletions
@@ -0,0 +1,26 @@
from datetime import UTC, datetime
from pyrogram import raw, utils
from userbot import PyroClient
from userbot.modules.read_receipts import repository
HANDLES = (raw.types.UpdateReadHistoryOutbox,)
async def handle(
client: PyroClient, update: raw.base.Update, _users: dict, _chats: dict
) -> None:
ctx = client.capture
if ctx is None or not isinstance(update, raw.types.UpdateReadHistoryOutbox):
return
chat_id = utils.get_peer_id(update.peer)
await repository.insert_read(
ctx.pool,
ctx.account_id,
chat_id,
chat_id,
datetime.now(UTC),
update.max_id,
str(update),
)