Repository navigation
User notifications, step 4: the Telegram block on the subscription page - #99
Merged
Merged
Conversation
… subscription page A person links their own chats to the people's bot from the subscription page (spec notifications-panel-spec, PR 4). Server: POST <link>/telegram, /telegram/link, /telegram/cancel, /telegram/unlink, /telegram/mute, under the page password and in the self-service write budget like the device removal. Only the person's own chats; the answer carries the language, the date, the mute flag and an opaque row id, never the chat id, chat_enc, chat_mac or the token. The page data gets tg_notify only when the people's bot is set, the owner allows self-service and the page is not a preview. Shared code: the link code (generation, hash, 15 minutes) and the chat limit moved from the telegram package to the store, so the public Worker does not import telegram; the owner's bot uses the same functions. Public edge Worker grows by about 54 KiB and keeps 148 KiB of headroom. Frontend: the block on the devices tab (off, wait, exp, on), a poll while the code waits, a countdown, the Announcements switch (mute), unlink, a new link; en/ru/zh/tr/fa (tr and fa wait for proofreading). Docs: a section in en/ru/zh with the privacy warning. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 4 of user notifications (spec §3, §10.3, §15): the "Telegram notifications" block on the subscription page, per the owner's mockup.
POST <link>/telegram,/telegram/link,/telegram/cancel,/telegram/<chat>/unlink,/telegram/<chat>/mute. Reading is free; changes spend the page's write budget.telegramto the store, so the public Worker does not link the bot.Checks: go vet, go test (subs, access, store, telegram, httpserver, app),
pnpm -C web typecheckand the wholepnpm -C web test,test-edge-store.ps1,check-edge-sizes.sh(public headroom 141 KiB, jobs 251 KiB).🤖 Generated with Claude Code