Don't encrypt settings_store
This commit is contained in:
parent
d6727d2d09
commit
a66df583fb
|
@ -66,8 +66,11 @@ const verifyCredentialsController: AppController = async (c) => {
|
||||||
: await accountFromPubkey(pubkey, { withSource: true });
|
: await accountFromPubkey(pubkey, { withSource: true });
|
||||||
|
|
||||||
if (settingsStore) {
|
if (settingsStore) {
|
||||||
const data = await signer.nip44!.decrypt(pubkey, settingsStore.content);
|
try {
|
||||||
account.pleroma.settings_store = JSON.parse(data);
|
account.pleroma.settings_store = JSON.parse(settingsStore.content);
|
||||||
|
} catch {
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.json(account);
|
return c.json(account);
|
||||||
|
@ -288,7 +291,7 @@ const updateCredentialsController: AppController = async (c) => {
|
||||||
await createEvent({
|
await createEvent({
|
||||||
kind: 30078,
|
kind: 30078,
|
||||||
tags: [['d', 'pub.ditto.pleroma_settings_store']],
|
tags: [['d', 'pub.ditto.pleroma_settings_store']],
|
||||||
content: await signer.nip44!.encrypt(pubkey, JSON.stringify(settingsStore)),
|
content: JSON.stringify(settingsStore),
|
||||||
}, c);
|
}, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue