Call the admins
group ping on the reply path; DM fan-out to every admin in cb-worker
/adm@admin/report- v1 scenarios
- 1
- Ported
- 4
- Green
- 7
- Failing
- —
group ping on the reply path; DM fan-out to every admin in cb-worker
UserRegisters.py:168-203What it does
Anyone in the group can type /adm (also /admin, /report, or the bare
mentions @admin/@adm) to ask the bot to summon its admins. The bot replies
with a Yes/No confirmation. Pressing Yes deletes that prompt and posts a
single message tagging every admin by username; each admin then also gets a
private message telling them they were called, with a button linking back to
the moment in the chat. Pressing No, or waiting more than ten minutes before
pressing anything, cancels it instead.
Behaviour that must not change
All four v1 triggers work, plus the two bare-word mention forms — nobody needs an admin permission to ask, only Telegram itself gates who can press the confirmation buttons meaningfully (anyone can press them; there is no permission check on the press either, matching v1 exactly). The confirmation expires 600 seconds after it was sent, and pressing it past that point always deletes the prompt and answers "Message too old, use /adm again" — a bare English string, never localised, same as v1. The group ping text and the admin-notification DM text are byte-identical to v1's, including the bot's own username appearing in the group ping whenever the bot itself is an admin (only the DM loop skips the bot, never the mention list).
One thing is deliberately not the same as v1: it used to quietly forward the triggering message to the bot's owner every tenth admin notification. v2 does not do this at all, to anyone, under any circumstance — recorded in the contract alongside the rest of the DM-fan-out behaviour.
The admin notifications are sent by cb-worker, not by the reply that
confirms the group ping — a group can have anywhere from one to a few dozen
admins, and sequential DMs with a throttle between them do not belong on the
path that has to answer Telegram's callback quickly.
How to verify it
qa/features/util_calladms.feature — seven scenarios (the base flow, four
alternate-trigger variants, decline, and staleness), run with
python scripts/cb.py test. By hand in the sandbox: run /adm in a group
with at least one other admin, press the checkmark, and watch the group
message tag every admin while each admin's own chat gets a private
notification with a "Show message" link back to the group.
Today's birthdays
both v1 shapes: the manual command, and the daily every-group broadcast - whose caller turned out to be COOKIEBOT.py:333-339 (the message handler's finally, on the first update of a new UTC day), not a scheduler. v2 runs it as a cron with one deferred job per group instead of v1's sleep(3) loop (D8)
Rewrite social links
rewrites the 3 hosts v1 actually rewrites; vm.tiktok.com short links need a redirect resolve