mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-06 10:52:31 +01:00
Correct the invite response
This commit is contained in:
parent
26bea41048
commit
2449d0b859
@ -19,7 +19,7 @@ router.post("/:code", route({}), async (req: Request, res: Response) => {
|
||||
const { features } = await Guild.findOneOrFail({ id: guild_id});
|
||||
const { public_flags } = await User.findOneOrFail({ id: req.user_id });
|
||||
|
||||
if(features.includes("INTERNAL_EMPLOYEE_ONLY") && (public_flags & 1) !== 1) throw new HTTPError("You are not allowed to join this guild.", 401)
|
||||
if(features.includes("INTERNAL_EMPLOYEE_ONLY") && (public_flags & 1) !== 1) throw new HTTPError("The Maze isn't meant for you.", 401)
|
||||
|
||||
const invite = await Invite.joinGuild(req.user_id, code);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user