Merge pull request #5114 from matrix-org/t3chguy/cherry-pick/5109

Fix /op slash command to release
This commit is contained in:
Michael Telatynski 2020-08-14 12:15:26 +01:00 committed by GitHub
commit 315435e3ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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"));
}