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_
},
reportDecryptionError(e) {
const _converse = this.__super__._converse,
__ = _converse.__;
this.messages.create({
'message': __("Sorry, could not decrypt a received OMEMO message due to an error.") + ` ${e.name} ${e.message}`,
'type': 'error'
});
const _converse = this.__super__._converse;
if (_converse.debug) {
const __ = _converse.__;
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) {
......@@ -239,13 +239,15 @@
},
reportDecryptionError (e) {
const { _converse } = this.__super__,
{ __ } = _converse;
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);
const { _converse } = this.__super__;
if (_converse.debug) {
const { __ } = _converse;
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.name} ${e.message}`, Strophe.LogLevel.ERROR);
},
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