Fix joining public rooms without aliases in search dialog (#10437)
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
This commit is contained in:
committed by
GitHub
parent
45525480ef
commit
1c039fcd38
@@ -492,7 +492,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
|
||||
}, [results, filter]);
|
||||
|
||||
const viewRoom = (
|
||||
room: { roomId: string; roomAlias?: string; autoJoin?: boolean; shouldPeek?: boolean },
|
||||
room: { roomId: string; roomAlias?: string; autoJoin?: boolean; shouldPeek?: boolean; viaServers?: string[] },
|
||||
persist = false,
|
||||
viaKeyboard = false,
|
||||
): void => {
|
||||
@@ -518,6 +518,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
|
||||
room_alias: room.roomAlias,
|
||||
auto_join: room.autoJoin,
|
||||
should_peek: room.shouldPeek,
|
||||
via_servers: room.viaServers,
|
||||
});
|
||||
onFinished();
|
||||
};
|
||||
@@ -634,6 +635,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
|
||||
roomId: publicRoom.room_id,
|
||||
autoJoin: !result.publicRoom.world_readable && !cli.isGuest(),
|
||||
shouldPeek: result.publicRoom.world_readable || cli.isGuest(),
|
||||
viaServers: [config.roomServer],
|
||||
},
|
||||
true,
|
||||
ev.type !== "click",
|
||||
|
||||
Reference in New Issue
Block a user