tg_activity
Discover active chats in any period, with separate incoming/outgoing counts and optional per-day calendar for one chat. Use it for daily recaps or checking when a chat was active.
Instructions
Which chats had any conversation in a period — "where did I talk today".
Unlike tg_unread this covers chats already read and chats where only the owner wrote, so it is the right start for a daily recap. Counts incoming and outgoing separately, archive included.
With chat the axis turns: not "which chats were active" but "which days this chat was active" — a per-day calendar over the whole history, without downloading it. Days are UTC, newest first, each carrying the message ids at its edges so tg_history can jump into that day.
The calendar is exact with exact=true, and for an attachment kind always. For all messages it comes from sparse server positions: exact up to ~2000 messages, sampled above that, and the reply says so.
Args: since: lower bound. Omitted means "today" (local midnight) for the all-chats view, "the whole history" for the calendar. Takes an ISO datetime or an offset like "-6h", "-30d". until: upper bound, ISO datetime; omit for "up to now". limit_chats: cap on chats returned (all-chats view). kind: all-chats view — one dialog type: "user", "bot", "group", "channel". Calendar — count one attachment type instead of all messages, same tabs as tg_media. include_own: false drops chats where nobody but the owner wrote. per_chat: also include this many messages from each chat as a sample. chat: switch to the per-day calendar of this one chat. limit_days: cap on days the calendar returns, newest first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat | No | ||
| kind | No | ||
| since | No | ||
| until | No | ||
| per_chat | No | ||
| limit_days | No | ||
| include_own | No | ||
| limit_chats | No |