返回提交历史
Modified
src/controllers/api/addToGuildController.ts
+5
-1
XFEstudio/XFESpaceNinjaServer
chore: don't allow clan invitation to users already in a clan (#3578)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3578 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
5d08bbc3
代码差异
1 个文件
+5
-1
@@ -53,7 +53,11 @@ const inviteToGuild = async (req: Request, res: Response, userName: string): Pro
53
53
}
54
54
55
55
const senderAccount = await getAccountForRequest(req);
56
const inventory = await getInventory(account._id, "Settings");
56
const inventory = await getInventory(account._id, "GuildId Settings");
57
if (inventory.GuildId) {
58
res.status(400).send("User is already in a guild");
59
return;
60
}
57
61
if (
58
62
inventory.Settings?.GuildInvRestriction == "GIFT_MODE_NONE" ||
59
63
(inventory.Settings?.GuildInvRestriction == "GIFT_MODE_FRIENDS" &&