diff --git a/src/controllers/api/pleroma.ts b/src/controllers/api/pleroma.ts index f76df018..9425878f 100644 --- a/src/controllers/api/pleroma.ts +++ b/src/controllers/api/pleroma.ts @@ -72,9 +72,12 @@ async function getConfigs(signal: AbortSignal): Promise { limit: 1, }], { signal }); - return jsonSchema.pipe(configSchema.array()).catch([]).parse( - await new AdminSigner().nip44.decrypt(Conf.pubkey, event.content).catch(() => ''), - ); + try { + const decrypted = await new AdminSigner().nip44.decrypt(Conf.pubkey, event.content); + return jsonSchema.pipe(configSchema.array()).catch([]).parse(decrypted); + } catch (_e) { + return []; + } } export { configController, frontendConfigController, pleromaAdminDeleteStatusController, updateConfigController };