listen for decryption errors
This commit is contained in:
parent
2cee9534c5
commit
5a83259233
@ -70,11 +70,16 @@ define([
|
|||||||
var decrypted = e.originalEvent;
|
var decrypted = e.originalEvent;
|
||||||
var metadata = decrypted.metadata;
|
var metadata = decrypted.metadata;
|
||||||
|
|
||||||
console.log(metadata);
|
if (decrypted.callback) { decrypted.callback(); }
|
||||||
console.log(defaultName);
|
//console.log(metadata);
|
||||||
|
//console.log(defaultName);
|
||||||
if (!metadata || metadata.name !== defaultName) { return; }
|
if (!metadata || metadata.name !== defaultName) { return; }
|
||||||
var title = document.title = metadata.name;
|
var title = document.title = metadata.name;
|
||||||
updateTitle(title || defaultName);
|
updateTitle(title || defaultName);
|
||||||
|
})
|
||||||
|
.on('decryptionError', function (e) {
|
||||||
|
var error = e.originalEvent;
|
||||||
|
Cryptpad.alert(error.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
require(['/common/media-tag.js'], function (MediaTag) {
|
require(['/common/media-tag.js'], function (MediaTag) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user