Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix inability to join a knock room via space hierarchy view #12404

Merged
merged 4 commits into from
Apr 11, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/structures/SpaceHierarchy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
HistoryVisibility,
HierarchyRelation,
HierarchyRoom,
JoinRule,
} from "matrix-js-sdk/src/matrix";
import { RoomHierarchy } from "matrix-js-sdk/src/room-hierarchy";
import classNames from "classnames";
Expand Down Expand Up @@ -157,7 +158,9 @@ const Tile: React.FC<ITileProps> = ({
<Spinner w={24} h={24} />
</AccessibleTooltipButton>
);
} else if (joinedRoom) {
} else if (joinedRoom || room.join_rule === JoinRule.Knock) {
// If the room is knockable, show the "View" button even if we are not a member; that
// allows us to reuse the "request to join" UX in RoomView.
button = (
<AccessibleButton
onClick={onPreviewClick}
Expand Down
Loading