fix(rooms): upgrading a room keeps its Lotus settings (#327) #373

Merged
jared merged 1 commits from fix/room-upgrade-lotus-state into lotus 2026-10-17 17:51:42 -04:00
Owner

Fixes #327.

POST /rooms/{id}/upgrade copies only Synapse's fixed list of state. An upgrade therefore silently dropped everything Lotus keeps in room state:

  • an audio-only voice channel became camera- and screenshare-allowed;
  • user limits and bitrate caps vanished;
  • the soundboard pack was lost;
  • a room set to delete messages after 7 days kept new ones forever.

Change: RoomUpgrade now reads the client-owned state first and re-creates it in the replacement room. The list lives in utils/roomUpgradeState (unit-tested): io.lotus.*, m.room.retention, role tags and room emoji packs. A partial copy is reported in the dialog instead of closing silently.

Verified headless through the UI, upgrading a v10 room that had a voice limit, a quality policy, a soundboard pack and retention:

  • Before: none of them survived.
  • After: all four are in the new room, with no errors.

Follow-up, not in this PR: for spaces, the children's m.space.parent events still point at the old space.

tsc clean · unit tests pass · ESLint/Prettier clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #327. `POST /rooms/{id}/upgrade` copies only Synapse's fixed list of state. An upgrade therefore silently dropped everything Lotus keeps in room state: - an audio-only voice channel became camera- and screenshare-allowed; - user limits and bitrate caps vanished; - the soundboard pack was lost; - a room set to delete messages after 7 days kept new ones forever. **Change:** `RoomUpgrade` now reads the client-owned state first and re-creates it in the replacement room. The list lives in `utils/roomUpgradeState` (unit-tested): `io.lotus.*`, `m.room.retention`, role tags and room emoji packs. A partial copy is reported in the dialog instead of closing silently. **Verified** headless through the UI, upgrading a v10 room that had a voice limit, a quality policy, a soundboard pack and retention: - **Before:** none of them survived. - **After:** all four are in the new room, with no errors. **Follow-up, not in this PR:** for spaces, the children's `m.space.parent` events still point at the old space. `tsc` clean · unit tests pass · ESLint/Prettier clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-16 22:23:19 -04:00
fix(rooms): upgrading a room keeps its Lotus settings (#327)
CI / Build & Quality Checks (pull_request) Successful in 4m0s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 9s
CI / Playwright smoke (e2e) (pull_request) Successful in 14m50s
57036bb6a4
POST /rooms/{id}/upgrade copies only Synapse's fixed list of state, so an
upgrade silently dropped everything Lotus keeps in room state: an
audio-only voice channel became camera/screenshare-allowed, user limits
and bitrate caps vanished, the soundboard pack was lost, and a room set
to delete messages after 7 days kept new ones forever.

RoomUpgrade now reads the client-owned state first (utils/roomUpgradeState,
unit-tested: io.lotus.*, m.room.retention, role tags, room emoji packs)
and re-creates it in the replacement room; a partial copy is reported in
the dialog instead of closing silently.

Verified headless through the UI (v10 room with voice limit, quality
policy, a soundboard pack and retention → upgrade): before, none
survived; now all four are in the new room.

Follow-up (not here): for spaces, the children's m.space.parent still
point at the old space.

Fixes #327

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 9edb76835c into lotus 2026-10-17 17:51:42 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#373