allow to update a private key from file#5294
Conversation
| if (typeof updatedKey === 'undefined') { | ||
| await Ui.modal.warning(Lang.setup.keyFormattedWell(this.prvHeaders.begin, String(this.prvHeaders.end)), Ui.testCompatibilityLink); | ||
| } else if (updatedKeyEncrypted.identities.length === 0) { | ||
| await Ui.modal.error(Lang.setup.prvHasUseridIssue); |
There was a problem hiding this comment.
This page is now using KeyImportUi for some visual handling, but it's not using KeyImportUi.checkPrv as it is not easy to adapt it here (we can try this in a separate issue)
Also, what should the message be if there is something wrong with UserIds (we currently don't support UserIds that don't contain email address in them)
I added this text

There was a problem hiding this comment.
@sosnovsky is there a vision on whether we should support keys with uids without emails?
There was a problem hiding this comment.
We currently support identities missing email address for public keys of recipients, but compose module assumes emails[0] matches identities[0] but that's not necessarily true. I suggest to refactor this part. Instead of "synchronized" arrays we can have an array of objects of the type returned by Str.parseEmail, it has { email, name, full } -- everything that's required. full is the original identity
There was a problem hiding this comment.
@sosnovsky is there a vision on whether we should support keys with uids without emails?
I think it's quite rare case and we didn't get any requests for such functionality, so we can leave it as is for now. Then we'll probably also need to update our mobile apps to support such keys.
We currently support identities missing email address for public keys of recipients, but compose module assumes emails[0] matches identities[0] but that's not necessarily true. I suggest to refactor this part.
That sounds good 👍
This PR allows to update a key from file
close #5291
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):