mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Fix room completion for invited rooms and upgraded rooms
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8a09cfbfbd
commit
b84fd245b1
@ -56,7 +56,7 @@ export default class RoomProvider extends AutocompleteProvider {
|
|||||||
const {command, range} = this.getCurrentCommand(query, selection, force);
|
const {command, range} = this.getCurrentCommand(query, selection, force);
|
||||||
if (command) {
|
if (command) {
|
||||||
// the only reason we need to do this is because Fuse only matches on properties
|
// the only reason we need to do this is because Fuse only matches on properties
|
||||||
let matcherObjects = client.getRooms().filter(
|
let matcherObjects = client.getVisibleRooms().filter(
|
||||||
(room) => !!room && !!getDisplayAliasForRoom(room),
|
(room) => !!room && !!getDisplayAliasForRoom(room),
|
||||||
).map((room) => {
|
).map((room) => {
|
||||||
return {
|
return {
|
||||||
|
@ -426,7 +426,7 @@ export class PartCreator {
|
|||||||
let room;
|
let room;
|
||||||
if (alias[0] === '#') {
|
if (alias[0] === '#') {
|
||||||
room = this._client.getRooms().find((r) => {
|
room = this._client.getRooms().find((r) => {
|
||||||
return r.getAliases().includes(alias);
|
return r.getAliases().includes(alias) || r.getCanonicalAlias() === alias;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
room = this._client.getRoom(alias);
|
room = this._client.getRoom(alias);
|
||||||
|
Loading…
Reference in New Issue
Block a user