diff --git a/src/controllers/GroupsController.ts b/src/controllers/GroupsController.ts index 7d92280..99dfd15 100644 --- a/src/controllers/GroupsController.ts +++ b/src/controllers/GroupsController.ts @@ -300,7 +300,7 @@ export class GroupsController { const groupID = await h.postGroupIDWithAccess("group_id", GroupsAccessLevel.MODERATOR_ACCESS); const userID = await h.postUserId("userID"); - if(!await GroupsHelper.GetMembershipLevel(groupID, userID)) + if(await GroupsHelper.GetMembershipLevel(groupID, userID) != GroupMembershipLevels.VISITOR) h.error(401, "The user is not a visitor of the group!"); await GroupsHelper.SendInvitation(groupID, userID);