mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
feat(api): protect group dm changes (#1244)
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user