|
|
@ -3806,15 +3806,27 @@ function rcube_webmail()
|
|
|
|
// wrapper for the mailvelope.createDisplayContainer API call
|
|
|
|
// wrapper for the mailvelope.createDisplayContainer API call
|
|
|
|
this.mailvelope_display_container = function(selector, data, keyring, msgid)
|
|
|
|
this.mailvelope_display_container = function(selector, data, keyring, msgid)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mailvelope.createDisplayContainer(selector, data, keyring, { showExternalContent: this.env.safemode }).then(function() {
|
|
|
|
var error_handler = function(error) {
|
|
|
|
$(selector).addClass('mailvelope').children().not('iframe').hide();
|
|
|
|
// remove mailvelope frame with the error message
|
|
|
|
|
|
|
|
$(selector + ' > iframe').remove();
|
|
|
|
ref.hide_message(msgid);
|
|
|
|
ref.hide_message(msgid);
|
|
|
|
setTimeout(function() { $(window).resize(); }, 10);
|
|
|
|
ref.display_message(error.message, 'error');
|
|
|
|
}, function(err) {
|
|
|
|
};
|
|
|
|
console.error(err);
|
|
|
|
|
|
|
|
|
|
|
|
mailvelope.createDisplayContainer(selector, data, keyring, { showExternalContent: this.env.safemode }).then(function(status) {
|
|
|
|
|
|
|
|
if (status.error && status.error.message) {
|
|
|
|
|
|
|
|
return error_handler(status.error);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ref.hide_message(msgid);
|
|
|
|
ref.hide_message(msgid);
|
|
|
|
ref.display_message('Message decryption failed: ' + err.message, 'error')
|
|
|
|
$(selector).addClass('mailvelope').children().not('iframe').hide();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// on success we can remove encrypted part from the attachments list
|
|
|
|
|
|
|
|
if (ref.env.pgp_mime_part)
|
|
|
|
|
|
|
|
$('#attach' + ref.env.pgp_mime_part).remove();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(function() { $(window).resize(); }, 10);
|
|
|
|
|
|
|
|
}, error_handler);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// subroutine to query keyservers for public keys
|
|
|
|
// subroutine to query keyservers for public keys
|
|
|
|