SIGN IN SIGN UP

Let admins write welcome messages, and finish ephemeral messages

Layer 229 lets a group's admins keep a few welcome messages that the server sends
each new member as ephemeral messages. Edit Chat gets a Welcome Message row (off,
the single template's text, or "X messages"), and it opens a section of its own
the way Android shows it: the templates read as incoming messages from the chat,
with no time, no topic separators, and "Only visible to you" on the first one
only. Its composer sends ephemeral templates to nobody yet (one attachment, no
schedule, polls, voice or inline bots, and it never touches the group's draft).
At the limit from ephemeral_welcome_messages_max it turns into a plate that says
so. The menu edits, copies and deletes; the topbar offers Delete All. Templates
live in their own storage, apart from the history, and follow the updates any
admin causes. manage_welcome_messages is an admin right, and a bot's is worded
"Send Welcome Messages" like desktop's.

Ephemeral messages, compared against desktop and Android:

- An anchored one (a bot's private stand-in for a message) says so at the top of
  its menu, has Revert with its explanation on a second line, allows Copy unless
  the message is protected, and stays on top when the history is loaded again.
- They work in private chats with bots: shown in that chat whatever peer_id
  says, and answerable privately.
- A media send shows an uploading placeholder, stored and deleted like any
  pending message until the echo replaces it. Deleting it stops the upload, and
  the chat is never told of an upload that is nobody's business.
- A keyboard or force-reply a bot sends ephemerally becomes the chat's keyboard.
  Ordering goes by date, since ephemeral ids are random. A spent single-use
  keyboard or answered force-reply is replaced rather than flagged in place, so
  the tab's mirror sees it.

The ephemeral test bot gains /anchor, /keyboard and /forcereply, and skips
redelivered answers whose ephemeral target has expired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
E
Eduard Kuzmenko committed
87c45a1896127e682aa2b87f3f99ab107e1ff0d9
Parent: 567a3df