Skip to content

fix: include topic and encryption in invite/knock stripped state#233

Merged
sufforest merged 1 commit into
mainfrom
wzy/invite-stripped-state-topic-encryption
Jul 3, 2026
Merged

fix: include topic and encryption in invite/knock stripped state#233
sufforest merged 1 commit into
mainfrom
wzy/invite-stripped-state-topic-encryption

Conversation

@sufforest

Copy link
Copy Markdown
Owner

An invite's stripped state — the federation 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, 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 /sync collect, and knock) had drifted independently. Unified them on a single vela_core::events::INVITE_STRIPPED_STATE_TYPES with 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 /sync invite_state; the existing knock stripped-state test now checks against the shared const.

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.
@sufforest sufforest merged commit 3ac263e into main Jul 3, 2026
11 checks passed
@sufforest sufforest deleted the wzy/invite-stripped-state-topic-encryption branch July 3, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant