Merge pull request #6362 from matrix-org/t3chguy/fix/inviting

pull/21833/head
Michael Telatynski 2021-07-13 14:39:28 +01:00 committed by GitHub
commit 80f3a64f53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -133,12 +133,12 @@ export default class MultiInviter {
if (!room) throw new Error("Room not found");
const member = room.getMember(addr);
if (member.membership === "join") {
if (member?.membership === "join") {
throw new MatrixError({
errcode: USER_ALREADY_JOINED,
error: "Member already joined",
});
} else if (member.membership === "invite") {
} else if (member?.membership === "invite") {
throw new MatrixError({
errcode: USER_ALREADY_INVITED,
error: "Member already invited",