skip loading room & finding member, use existing member field

This commit is contained in:
Michael Telatynski 2021-07-12 12:51:49 +01:00
parent 3515b2ca05
commit 8139aeb073

View File

@ -27,8 +27,6 @@ import AutocompleteWrapperModel, {
import * as Avatar from "../Avatar";
import defaultDispatcher from "../dispatcher/dispatcher";
import { Action } from "../dispatcher/actions";
import RoomViewStore from "../stores/RoomViewStore";
import { MatrixClientPeg } from "../MatrixClientPeg";
interface ISerializedPart {
type: Type.Plain | Type.Newline | Type.Command | Type.PillCandidate;
@ -416,7 +414,7 @@ class UserPillPart extends PillPart {
protected onClick = () => {
defaultDispatcher.dispatch({
action: Action.ViewUser,
member: MatrixClientPeg.get().getRoom(RoomViewStore.getRoomId()).getMember(this.resourceId),
member: this.member,
});
};