Delete OpenPGP keys on the server when they are deleted in the browser

This commit is contained in:
Sergey Mosin 2024-12-05 11:14:03 -05:00
parent 7eaa065d76
commit c0348893af
3 changed files with 31 additions and 4 deletions

View file

@ -13,7 +13,7 @@ import { OpenPgpKeyPopupView } from 'View/Popup/OpenPgpKey';
import { Passphrases } from 'Storage/Passphrases';
import { baseCollator } from 'Common/Translator';
import { baseCollator, getNotification } from 'Common/Translator';
const
loaded = () => !!window.openpgp,
@ -120,6 +120,17 @@ class OpenPgpKeyModel {
OpenPGPUserStore.publicKeys.remove(this);
storeOpenPgpKeys(OpenPGPUserStore.publicKeys, publicKeysItem);
}
Remote.request('DeletePGPKey',
(iError, oData) => {
if (oData) {
if (iError || oData.Result === false) {
alert(oData.message || getNotification(iError));
}
}
}, {
key: this.armor
}
);
}
}
/*