feat(room-preview): join-rule + encryption chips, Request-to-join for knock rooms
CI / Build & Quality Checks (push) Successful in 10m48s
CI / Trigger Desktop Build (push) Successful in 8s

Room preview (JoinBeforeNavigate -> RoomCard via getRoomSummary) was already
built and, verified after the Synapse 1.156 upgrade, works via the SDK's unstable
im.nheko.summary endpoint (the old 'blocked' flag tested the wrong /v1 path).

Polish the preview card with the summary fields the endpoint returns:
- join-rule chip (Restricted / Ask to join / Invite only / Private; public shows
  none) + an Encrypted badge (from im.nheko.summary.encryption).
- knock-rule rooms now show a 'Request to join' button (mx.knockRoom) instead of a
  plain Join that would fail — mirrors the RoomIntro knock flow.

Props are optional so other RoomCard usages are unaffected. LOTUS_TODO updated:
Room Preview BLOCKED -> done; Synapse 1.155 -> 1.156.0. 738 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 13:36:41 -04:00
parent a3ca951fba
commit 44420220d4
3 changed files with 67 additions and 17 deletions
@@ -66,6 +66,8 @@ export function JoinBeforeNavigate({
topic={summary?.topic}
memberCount={summary?.num_joined_members}
roomType={summary?.room_type}
joinRule={summary?.join_rule}
encrypted={!!summary?.['im.nheko.summary.encryption']}
viaServers={viaServers}
renderTopicViewer={(name, topic, requestClose) => (
<RoomTopicViewer name={name} topic={topic} requestClose={requestClose} />