Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6362 from matrix-org/t3chguy/fix/inviting
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Jul 13, 2021
2 parents 199c803 + 7433419 commit 80f3a64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/MultiInviter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 80f3a64

Please sign in to comment.