fix: include topic and encryption in invite/knock stripped state#233
Merged
Conversation
An invite's stripped state (invite_room_state, and the invitee's /sync invite_state) omitted m.room.topic and m.room.encryption, so an invitee couldn't see the room topic or the "encrypted" badge before joining. The knock bundle was missing the topic too. Three copies of the type list had drifted independently; unify them on vela_core::events::INVITE_STRIPPED_STATE_TYPES with the full CS-API recommended set so they can't diverge again.
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.
An invite's stripped state — the federation
invite_room_stateand the invitee's/syncinvite_state— omittedm.room.topicandm.room.encryption. So an invitee couldn't see the room topic or the "encrypted" badge before joining, even though both are in the CS-API recommended stripped-state set. The knock bundle (knock_room_state) was missing the topic as well (its comment even mentioned topic).Root cause: three copies of the type list (invite build, the invitee's
/synccollect, and knock) had drifted independently. Unified them on a singlevela_core::events::INVITE_STRIPPED_STATE_TYPESwith the full recommended set (create, name, avatar, topic, canonical_alias, join_rules, encryption, member) so they can't diverge again.Tests: the const covers the recommended set; an end-to-end test sets a topic + encryption on a room, invites a user, and asserts both appear in the invitee's
/syncinvite_state; the existing knock stripped-state test now checks against the shared const.