feat(room-preview): join-rule + encryption chips, Request-to-join for knock rooms
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:
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user