You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d1a91a1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(communities): accept invite links and bare hosts in Join a community
Join a community refused the invite link Buzz itself mints
(https://<host>/invite/<code>). It also refused a bare host such as
secondary.example, telling the user to enter a wss:// or https:// relay
URL. The no-community landing accepted the link but refused bare hosts,
while the native first-run field accepted both.
Both fields now read input through parsePastedInvite:
- Its final fallback is enteredRelayOrigin instead of
communityDestination, so a bare host is read as wss:// and then passes
the same secure-origin checks.
- The dialog's destination step parses with it and keeps the
communityDestination check on the parsed origin. An invite link's code
fills Invite code, as the invite prop does.
- An unreadable value gets the native field's copy, "Enter a community
address or invite link."
- ws://, http://, credentials, other paths, query and fragment are
still rejected.
- An origin supplied by an OS invite parses with no code, so it leaves
the prefilled code alone.
Accepted consequences:
- Typed text on the landing no longer resolves BUZZ_COMMUNITY_ALIASES,
matching the rule that typed addresses never resolve aliases.
- A dotted bare code such as v2.invite now reads as https://v2.invite
and fails at lookup rather than inline.
- Edit connection shares the destination step, so it also takes bare
hosts and invite links.
- The native CommunityUrlField and the relay's invite URL format are
unchanged.
docs/communities.md now describes bare hosts and invite links, and the
help guide says Join a community takes either.
Tests:
- invite-link adds bare-host accepts, moves v2.invite to the accept
list, and adds rejects for the bare-host forms of the refused inputs.
- CommunityDialog swaps not-a-relay for "not a relay" with the new copy,
and adds invite-link and bare-host lookups.
- CommunityLanding adds a bare-host lookup.
- All 9 new or changed cases fail against main's production code and
pass with the fix.
Validation on this snapshot:
- Unit tests for invite-link, CommunityDialog, CommunityLanding and
CommunityUrlField: 92 passed, with CommunityUrlField unchanged.
- tests/browser/dialog-actions.spec.mjs and navigation-join.spec.mjs:
4/4 in Chromium and 4/4 in WebKit.
- pnpm typecheck and pnpm lint pass.
After-fix recording check: PASSED. The note's flow,
rec2-community-join-invite-link, asserts the old refusals, so it was
re-run as a copy with the same stubs and steps and inverted expectations
(Chromium 1280x800, browser build of this tree).
- In Join a community, the minted link opens Your profile, and Back
shows Invite code "fixture" under https://primary.example.
- secondary.example is looked up as https://secondary.example with no
Invite code field, and wss://secondary.example still works.
- On the no-community landing, both secondary.example and the minted
link reach Your profile, with no inline refusal.
Not checked:
- The native desktop build was not run.
- The policy-message interaction with the unmerged relay trust policy
PR depends on that PR keeping communityDestination in the destination
step, which this change does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Matt Toohey <[email protected]>
0 commit comments