The website's Telegram bot for user notifications: one website-wide Telegram
connection (Settings → Integrations), chosen by the admin, that delivers to
every user who linked their chat to it (Telegram.Linking).
The choice is the telegram_notifications_connection setting — the uuid of a
:system Telegram connection. Empty means off, which is the default: a site
that never opts in keeps today's behaviour (personal bots only).
connection_uuid/0 returns the uuid only while it still names an existing
website Telegram connection, so deleting or replacing the connection turns the
feature off instead of leaving a dangling reference.
Summary
Functions
The bot's @username (without the @), or nil when it cannot be told. Read
from the last connection test; asks Telegram when that never ran.
Stops delivering user notifications through the website bot.
The site bot's connection uuid, or nil when off or no longer valid.
Makes uuid — a website Telegram connection — the one that delivers user
notifications. There is one: choosing another replaces it, because a bot's
updates can be read by one reader only.
Whether uuid is the connection chosen for user notifications.
Whether the website bot has a webhook. Linking reads the bot's updates with
getUpdates, which Telegram refuses on a bot that has one.
Functions
The bot's @username (without the @), or nil when it cannot be told. Read
from the last connection test; asks Telegram when that never ran.
Stops delivering user notifications through the website bot.
@spec connection_uuid() :: String.t() | nil
The site bot's connection uuid, or nil when off or no longer valid.
Makes uuid — a website Telegram connection — the one that delivers user
notifications. There is one: choosing another replaces it, because a bot's
updates can be read by one reader only.
Whether uuid is the connection chosen for user notifications.
Whether the website bot has a webhook. Linking reads the bot's updates with
getUpdates, which Telegram refuses on a bot that has one.