Support any alias not just first

This commit is contained in:
Michael Telatynski 2021-05-18 13:31:53 +01:00
parent 655010844a
commit edb2026780
2 changed files with 8 additions and 3 deletions

View file

@ -92,7 +92,7 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
if (lcQuery) {
const matcher = new QueryMatcher<Room>(visibleRooms, {
keys: ["name"],
funcs: [r => r.getCanonicalAlias() ?? r.getAltAliases()?.[0]],
funcs: [r => [r.getCanonicalAlias(), ...r.getAltAliases()].filter(Boolean)],
shouldMatchWordsOnly: false,
});