fix(share): use the guild's verified custom domain for form links#207
Merged
Conversation
The per-form Share panel (link, QR code and embed snippet) always built the URL from the primary domain via appBaseUrl(), so a guild with a verified custom domain still shared the default forms.msk-scripts.de link. The forms page now resolves the public base to the guild's custom domain when customDomainVerifiedAt is set, and falls back to the primary domain otherwise. Live forms are served on the custom domain, so the shared link resolves correctly.
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.
Customer report: when sharing a form, the Share panel shows the default MSK link instead of the custom domain.
Cause
The per-form Share panel (link, QR code, embed snippet) built its URL from
appBaseUrl()(the primary domain) regardless of the guild's custom domain. So a guild with a verified custom domain still got aforms.msk-scripts.de/f/...link.Fix
The forms dashboard page now resolves the public base URL to the guild's custom domain when
customDomainVerifiedAtis set, falling back to the primary domain otherwise. That base drives the shared link, the QR code and the embed iframe, so all three point at the branded domain. Verified custom domains already serve/f/[slug]for their own guild, so the link resolves.No schema change. Typecheck, lint and build green.