Fix /op slash command

(cherry picked from commit 3f2c1500e5)
This commit is contained in:
Michael Telatynski 2020-08-13 16:29:25 +01:00
parent 054067abbe
commit 38701f3e71

View file

@ -733,7 +733,7 @@ export const Commands = [
const cli = MatrixClientPeg.get();
const room = cli.getRoom(roomId);
if (!room) return reject(_t("Command failed"));
const member = room.getMember(args);
const member = room.getMember(userId);
if (!member || getEffectiveMembership(member.membership) === EffectiveMembership.Leave) {
return reject(_t("Could not find user in room"));
}