feat(api): protect group dm changes (#1244)

This commit is contained in:
Hampus authored and GitHub committed 2026-07-01 21:55:59 +02:00
1 parent 6fd7c027e3
commit 33d05f9763
7 files changed
+210 -5

No files matched your search

@@ -48,7 +48,7 @@ function resolveCaptchaProvider(
return createCaptchaProvider({mode: requestedProvider, secretKey});
}
async function verifyCaptchaToken(ctx: Context<HonoEnv>): Promise<void> {
export async function verifyCaptchaToken(ctx: Context<HonoEnv>): Promise<void> {
const captchaConfig = await ctx.get('instanceConfigRepository').getEffectiveCaptchaConfig();
if (!captchaConfig.enabled && !(Config.dev.testModeEnabled && Config.captcha.enabled)) return;
const user = ctx.get('user') as User | undefined;