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)
/birthday/aniversario/cumpleanos- v1 scenarios
- 1
- Ported
- 3
- Green
- 3
- Failing
- —
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)
Birthdays.py:14-61What it does
/birthday (also /aniversario, /cumpleanos) posts a photo collage of
everyone in the group celebrating a birthday today, with a random
celebratory caption, and pins it. You can also tag people directly
(/birthday @friend) to add them to the collage regardless of whether the
bot knows their birthday.
Behaviour that must not change
Typing /birthday on its own does not show today's birthdays — it asks
you to type usernames instead. This looks backwards, but it is exactly what
v1 does, confirmed by reading its code: only /birthday with something
after it reaches the real lookup. A tagged name and a real registered
birthday can both appear in the same collage even if they're the same
person — v1 never checked for that either.
Known gap, not yet resolved: v1 also appears to post an unattended birthday collage to every group automatically, once a day, from something outside its own source code (no cron job or scheduler for this exists anywhere in the reference checkout). This port only builds the manual, on-demand command — the thing you can actually verify by reading the code. Whether groups currently receive an automatic daily post is unconfirmed; if they do, that is real work still to do before this feature can be called complete, not an optional extra.
How to verify it
qa/features/util_birthday.feature — run with python scripts/cb.py test.
By hand in the sandbox: have someone with a known birthday talk in the
group, then run /birthday @them and confirm a collage with their photo
(or a placeholder, if none is available) shows up, gets pinned, and a 🎂
message follows.