Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cypress/e2e/12-spotlight/spotlight.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ describe("Spotlight", () => {
cy.spotlightResults().eq(0).click();
cy.url().should("contain", room2Id);
}).then(() => {
cy.get(".mx_RoomPreviewBar_actions .mx_AccessibleButton").click();
cy.get(".mx_RoomView_MessageList").should("have.length", 1);
cy.roomHeaderName().should("contain", room2Name);
});
});
Expand Down
5 changes: 3 additions & 2 deletions src/components/views/dialogs/spotlight/SpotlightDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
}, [results, filter]);

const viewRoom = (
room: {roomId: string, roomAlias?: string, peek?: boolean},
room: {roomId: string, roomAlias?: string, autoJoin?: boolean},
persist = false,
viaKeyboard = false,
) => {
Expand All @@ -510,6 +510,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
metricsViaKeyboard: viaKeyboard,
room_id: room.roomId,
room_alias: room.roomAlias,
auto_join: room.autoJoin,
});
onFinished();
};
Expand Down Expand Up @@ -627,7 +628,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
viewRoom({
roomAlias: publicRoom.canonical_alias || publicRoom.aliases?.[0],
roomId: publicRoom.room_id,
peek: result.publicRoom.world_readable || cli.isGuest(),
autoJoin: !result.publicRoom.world_readable && !cli.isGuest(),
}, true, ev.type !== "click");
};
return (
Expand Down