OpenPGP fix handling of importing keys

This commit is contained in:
the-djmaze 2024-03-04 12:42:23 +01:00
parent 5aa71a3ede
commit b5062624fa
2 changed files with 32 additions and 20 deletions

View file

@ -63,11 +63,7 @@ export class UserSettingsSecurity extends AbstractViewSettings {
importToOpenPGP() {
OpenPGPUserStore.isSupported() && Remote.request('GetPGPKeys',
(iError, oData) => {
if (!iError && oData.Result) {
oData.Result.forEach(key => OpenPGPUserStore.importKey(key));
}
}
(iError, oData) => !iError && oData.Result && OpenPGPUserStore.importKeys(oData.Result)
);
}