From 3f2c1500e54d83916625bbe4d1b7e28b692be721 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 13 Aug 2020 16:29:25 +0100 Subject: [PATCH] Fix /op slash command --- src/SlashCommands.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 2063ad3149..50a49ccf1c 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -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")); }