mirror of
https://github.com/moparisthebest/mail
synced 2024-11-29 12:22:22 -05:00
Show error msg in message list
This commit is contained in:
parent
9d3bc51fcf
commit
0c6d279e82
@ -47,8 +47,8 @@ define(function(require) {
|
||||
app.string = {
|
||||
subjectPrefix: '[whiteout] ',
|
||||
invitationSubject: 'Invitation to a private conversation',
|
||||
invitationMessage: 'I would like to invite you to a private conversation. To read my encrypted messages, simply install Whiteout Mail for Chrome. The app is really easy to use and automatically encrypts sent emails, so that only the two of us can read them: https://chrome.google.com/webstore/detail/jjgghafhamholjigjoghcfcekhkonijg',
|
||||
message: 'this is a private conversation. To read my encrypted message below, simply install Whiteout Mail for Chrome. The app is really easy to use and automatically encrypts sent emails, so that only the two of us can read them: https://chrome.google.com/webstore/detail/jjgghafhamholjigjoghcfcekhkonijg',
|
||||
invitationMessage: 'I would like to invite you to a private conversation. To read my encrypted messages, simply install Whiteout Mail for Chrome. The app is really easy to use and automatically encrypts sent emails, so that only the two of us can read them.\n\nOpen Whiteout Mail: https://chrome.google.com/webstore/detail/jjgghafhamholjigjoghcfcekhkonijg',
|
||||
message: 'this is a private conversation. To read my encrypted message below, simply install Whiteout Mail for Chrome. The app is really easy to use and automatically encrypts sent emails, so that only the two of us can read them.\n\nOpen Whiteout Mail: https://chrome.google.com/webstore/detail/jjgghafhamholjigjoghcfcekhkonijg',
|
||||
cryptPrefix: '-----BEGIN PGP MESSAGE-----',
|
||||
cryptSuffix: '-----END PGP MESSAGE-----',
|
||||
signature: 'Sent securely from whiteout mail',
|
||||
|
@ -295,9 +295,7 @@ define(function(require) {
|
||||
|
||||
if (!senderPubkey) {
|
||||
// this should only happen if a mail from another channel is in the inbox
|
||||
callback({
|
||||
errMsg: 'No public key for the sender'
|
||||
});
|
||||
setBodyAndContinue('Public key for sender not found!');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -307,11 +305,15 @@ define(function(require) {
|
||||
decrypted = err.errMsg;
|
||||
}
|
||||
|
||||
email.body = decrypted;
|
||||
setBodyAndContinue(decrypted);
|
||||
});
|
||||
});
|
||||
|
||||
function setBodyAndContinue(text) {
|
||||
email.body = text;
|
||||
cleartextList.push(email);
|
||||
localCallback();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function verify(email, localCallback) {
|
||||
|
@ -608,8 +608,9 @@ define(function(require) {
|
||||
offset: 0,
|
||||
num: 1
|
||||
}, function(err, emails) {
|
||||
expect(err).to.exist;
|
||||
expect(emails).to.not.exist;
|
||||
expect(err).to.not.exist;
|
||||
expect(emails).to.exist;
|
||||
expect(emails[0].body).to.equal('Public key for sender not found!');
|
||||
expect(devicestorageStub.listItems.calledOnce).to.be.true;
|
||||
expect(keychainStub.getReceiverPublicKey.calledOnce).to.be.true;
|
||||
done();
|
||||
|
Loading…
Reference in New Issue
Block a user