Repository navigation
feat(discord): finish the bot migration — retire the webhook transport and close the frontend gaps - #409
Merged
Conversation
… installed A fresh Discord integration on an instance that has the bot rendered an empty "Webhook URL" box directly under a panel telling you to install the bot instead. Two ways to wire the same integration, one of them legacy, offered side by side with no indication which to pick. The field now follows the same rule the connected branch already used: it shows when it is the real answer, and not otherwise. That is when the instance has no bot to install, so the webhook is the only transport, or when the integration already stores a URL - the pre-bot integrations the bot rework must never break. The e2e covers both directions, because hiding it unconditionally would pass a one-sided test: bot available and nothing stored hides the field, and the same integration on a bot-less instance still shows it. Co-Authored-By: Claude Opus 5 <[email protected]>
The bot rework left two transports side by side: the instance bot with threads, buttons and in-place edits, and the legacy one-way webhook POST a pre-bot integration was created with. The dashboard had already stopped offering the webhook field when the bot can be installed, so the sending path was the last half of a deprecation with no announced end. This deletes it outright: - DiscordSender.Send no longer falls back to webhook delivery. A guild-less, channel-less integration now fails with ErrDiscordNoDestination instead of the webhook error, so a misconfigured row says so instead of silently routing somewhere else. - The webhook HTTP client (internal/integrations/discord/client.go) and the WebhookMessage type are gone. ErrUnexpectedStatus and DefaultTimeout moved into bot_client.go, where their remaining callers live. - The legacy-mode test file went with them. WebhookURL itself stays on models.DiscordSettings, the install service and the dashboard form: stored and displayed for the pre-bot rows that still carry one, but nothing reads it to send anymore.
Deleting client.go took the package's revive package comment with it. It now lives on types.go, reworded for what the package actually is since the webhook client is gone.
…gram Two sites still enumerated telegram by hand and were never extended when the discord contact type shipped: - canTest, inline in account.notifications.tsx, offered a Test button on an unverified discord route whose call answers ErrContactNotVerified. The rule now lives in a tested helper, contactCanTest in lib/notifications.ts, mirroring the backend's contactRequiresSetup — and unknown future types stay testable by default, as before. - getCommentSource mapped a discord-ingested comment to undefined, so the incident timeline rendered it with no source badge where Slack and Telegram get one. It now returns "discord", the timeline renders the badge, and comments.viaDiscord is added to all four locales. Spec: specs/done/2026/09/2026-09-20-01-discord-frontend-telegram-parity.md
…ed one @simplewebauthn/browser owns one shared abort signal for every WebAuthn ceremony, so a conditional-UI (background autofill) ceremony that starts after the user clicks Sign in with a passkey would abort that explicit ceremony and surface as a flaky RP-ID-mismatch login error. The login page now sets a flag before starting the explicit ceremony and skips the background one when it is set. Spec: specs/done/2026/09/2026-09-20-01-passkey-rp-id-mismatch-flaky-login-error.md
…x/discord-hide-empty-webhook-field
fclairamb
enabled auto-merge (squash)
September 20, 2026 20:47
Merged
fclairamb
added a commit
that referenced
this pull request
Sep 21, 2026
🤖 I have created a release *beep* *boop* --- ## [0.30.0](v0.29.2...v0.30.0) (2026-09-21) ### Features * add a super-admin user directory and page people on Discord ([#406](#406)) ([3506c8f](3506c8f)) * **discord:** finish the bot migration — retire the webhook transport and close the frontend gaps ([#409](#409)) ([e89710d](e89710d)) * group-based status page sections, ICMP burst sampling, and form exposure ([#411](#411)) ([e3c87e8](e3c87e8)) ### Bug Fixes * **deps:** update module github.com/urfave/cli/v3 to v3.13.0 ([#408](#408)) ([5c10ab5](5c10ab5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
fclairamb
added a commit
that referenced
this pull request
Oct 9, 2026
Three specs from a self-hoster's report: - 02: secret fields (SMTP password, JWT secret, inbox password) are dropped on first save; test mail ignores env overrides. - 03: Discord webhook delivery was removed in #409 but the UI and docs still offer it. Bring it back as the no-bot fallback. - 04: bot install uses a second redirect URI the public docs never list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What & why
The Discord bot migration left loose ends on both sides of the API: a legacy webhook transport still wired behind the dashboard, and frontend branches that enumerate
telegramwithoutdiscord. This PR closes all of them.1. Dashboard: the empty webhook field is hidden when the bot can be installed
A fresh Discord integration on an instance with the bot rendered an empty Webhook URL box directly under the panel telling you to install the bot. The not-connected branch now applies the same rule the connected branch already used. The field still shows when the instance has no bot (only transport) or the integration already stores a URL (pre-bot rows).
2. Backend: the webhook sending path is removed
DiscordSender.Sendno longer falls back to webhook delivery — a guild-less, channel-less integration fails withErrDiscordNoDestination.WebhookMessagetype are gone;ErrUnexpectedStatus/DefaultTimeoutmoved intobot_client.go. Net for that commit: −349 lines.WebhookURLstays onmodels.DiscordSettingsand the form — stored and displayed, but nothing reads it to send anymore.3. Dashboard: cover discord everywhere it branched on telegram
ErrContactNotVerified) moved to a tested helpercontactCanTestinlib/notifications.ts, mirroring the backend'scontactRequiresSetup.getCommentSourcedropped discord, so a Discord-ingested comment rendered with no "via" badge. It now returnsdiscord, the timeline renders the badge, andcomments.viaDiscordlands in all four locales.4. Passkey: guard the conditional-UI ceremony against a click-started one
@simplewebauthn/browser owns one shared abort signal for every WebAuthn ceremony, so a background conditional-UI ceremony starting after a click would abort the explicit one — surfacing as a flaky RP-ID-mismatch login error. The login page now skips the background ceremony once an explicit one starts.
How to test