mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(api): reject unclaimed guild creation before the email verification gate (#1689)
This commit is contained in:
1 parent
96643ab20d
commit
e0bb10d5b7
1 file changed
+3
-1
@@ -50,7 +50,9 @@ export function GuildBaseController(app: HonoApp) {
|
|||||||
if (policy.single_community_enabled) {
|
if (policy.single_community_enabled) {
|
||||||
throw new SingleCommunityCannotCreateGuildsError();
|
throw new SingleCommunityCannotCreateGuildsError();
|
||||||
}
|
}
|
||||||
requireEmailVerified(user, 'guild_creation');
|
if (!user.isUnclaimedAccount()) {
|
||||||
|
requireEmailVerified(user, 'guild_creation');
|
||||||
|
}
|
||||||
const auditLogReason = ctx.get('auditLogReason') ?? null;
|
const auditLogReason = ctx.get('auditLogReason') ?? null;
|
||||||
const locale = ctx.get('requestLocale') ?? null;
|
const locale = ctx.get('requestLocale') ?? null;
|
||||||
return ctx.json(await ctx.get('guildService').data.createGuild({user, data, locale}, auditLogReason));
|
return ctx.json(await ctx.get('guildService').data.createGuild({user, data, locale}, auditLogReason));
|
||||||
|
|||||||
Reference in new issue
Block a user