Repository navigation
Auto-setup cross-signing for new accounts and invite to encrypted rooms - #52
Merged
Merged
Conversation
People who registered and then joined a community's rooms couldn't read messages sent before they joined, and others couldn't read theirs. - matrix-js-sdk only shares room history (MSC4268 key bundles) when the user is invited to the room itself, and only with devices cross-signed by their owner. Community rooms are joined through the space, and new accounts never had cross-signing, so no history keys were ever shared. - Clients that exclude insecure devices won't exchange room keys with a device that isn't cross-signed. Set up cross-signing for the new device right after registering, using the registration password (kept in memory only) if the server asks for auth. When inviting someone to a community, also invite them to its encrypted rooms with shared history, so the history keys are shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HozsUkW1DXEwYsQybGemSH
…-qwt1cr # Conflicts: # src/app/pages/client/ClientNonUIFeatures.tsx
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.
Description
This PR adds automatic cross-signing setup for newly registered accounts and improves community invitations to include encrypted rooms with readable history.
New account cross-signing:
newAccountCrossSigning.tsutilities to automatically bootstrap cross-signing for accounts registered on the current deviceClientNonUIFeaturesso it runs automatically when the client loadsCommunity invitations:
inviteToCommunity()function that invites users to a community space and automatically invites them to encrypted child rooms with readable history (shared/world_readable)shouldInviteToChildRoom()logic to determine which rooms should receive invites based on encryption, history visibility, and permissionsWhy this matters:
Fixes #
Checklist:
newAccountCrossSigning.test.ts,communitySettings.test.ts)npm test)https://claude.ai/code/session_01HozsUkW1DXEwYsQybGemSH