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

Peek into world-readable rooms from spotlight #9115

Merged
merged 4 commits into from
Jul 29, 2022
Merged
Changes from 1 commit
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
Next Next commit
Peek into world-readable rooms from spotlight
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
  • Loading branch information
SimonBrandner committed Jul 29, 2022
commit 036eeaa1ae0ea36df9837b0d790cf29636aa0595
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,11 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
// eslint-disable-next-line
}, [results, filter]);

const viewRoom = (room: {roomId: string, roomAlias?: string}, persist = false, viaKeyboard = false) => {
const viewRoom = (
room: {roomId: string, roomAlias?: string, peek?: boolean},
persist = false,
viaKeyboard = false,
) => {
if (persist) {
const recents = new Set(SettingsStore.getValue("SpotlightSearch.recentSearches", null).reverse());
// remove & add the room to put it at the end
Expand Down Expand Up @@ -623,6 +627,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(),
}, true, ev.type !== "click");
};
return (
Expand Down