From a66df583fb301dc3ddbfb7c47567f14407dce271 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 26 May 2024 12:34:18 -0500 Subject: [PATCH] Don't encrypt settings_store --- src/controllers/api/accounts.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/controllers/api/accounts.ts b/src/controllers/api/accounts.ts index ef9d634..d9f2292 100644 --- a/src/controllers/api/accounts.ts +++ b/src/controllers/api/accounts.ts @@ -66,8 +66,11 @@ const verifyCredentialsController: AppController = async (c) => { : await accountFromPubkey(pubkey, { withSource: true }); if (settingsStore) { - const data = await signer.nip44!.decrypt(pubkey, settingsStore.content); - account.pleroma.settings_store = JSON.parse(data); + try { + account.pleroma.settings_store = JSON.parse(settingsStore.content); + } catch { + // Ignore + } } return c.json(account); @@ -288,7 +291,7 @@ const updateCredentialsController: AppController = async (c) => { await createEvent({ kind: 30078, tags: [['d', 'pub.ditto.pleroma_settings_store']], - content: await signer.nip44!.encrypt(pubkey, JSON.stringify(settingsStore)), + content: JSON.stringify(settingsStore), }, c); }