Commit 6f13676e authored by JC Brand's avatar JC Brand

Show OMEMO error messages only in debug mode

parent 1d5cf8eb
...@@ -71805,14 +71805,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -71805,14 +71805,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, },
reportDecryptionError(e) { reportDecryptionError(e) {
const _converse = this.__super__._converse, const _converse = this.__super__._converse;
__ = _converse.__;
this.messages.create({ if (_converse.debug) {
'message': __("Sorry, could not decrypt a received OMEMO message due to an error.") + ` ${e.name} ${e.message}`, const __ = _converse.__;
'type': 'error' this.messages.create({
}); 'message': __("Sorry, could not decrypt a received OMEMO message due to an error.") + ` ${e.name} ${e.message}`,
'type': 'error'
});
}
_converse.log(e, Strophe.LogLevel.ERROR); _converse.log(`${e.name} ${e.message}`, Strophe.LogLevel.ERROR);
}, },
decrypt(attrs) { decrypt(attrs) {
...@@ -239,13 +239,15 @@ ...@@ -239,13 +239,15 @@
}, },
reportDecryptionError (e) { reportDecryptionError (e) {
const { _converse } = this.__super__, const { _converse } = this.__super__;
{ __ } = _converse; if (_converse.debug) {
this.messages.create({ const { __ } = _converse;
'message': __("Sorry, could not decrypt a received OMEMO message due to an error.") + ` ${e.name} ${e.message}`, this.messages.create({
'type': 'error', 'message': __("Sorry, could not decrypt a received OMEMO message due to an error.") + ` ${e.name} ${e.message}`,
}); 'type': 'error',
_converse.log(e, Strophe.LogLevel.ERROR); });
}
_converse.log(`${e.name} ${e.message}`, Strophe.LogLevel.ERROR);
}, },
decrypt (attrs) { decrypt (attrs) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment