Override save on ChatBox to not persist the 'trimmed' attribute
This commit is contained in:
parent
0c0a3f86b6
commit
1a92db8946
18
converse.js
18
converse.js
@ -662,6 +662,24 @@
|
||||
}
|
||||
},
|
||||
|
||||
save: function(key, val, options) {
|
||||
/* Override the backbone function and exclude the 'trimmed'
|
||||
* attribute from being persisted.
|
||||
*/
|
||||
var attrs;
|
||||
// Handle both `"key", value` and `{key: value}` -style arguments.
|
||||
if (key == null || typeof key === 'object') {
|
||||
attrs = key;
|
||||
options = val;
|
||||
} else {
|
||||
(attrs = {})[key] = val;
|
||||
}
|
||||
if (typeof attrs === 'object') {
|
||||
delete attrs.trimmed;
|
||||
}
|
||||
Backbone.Model.prototype.save.call(this, attrs, options);
|
||||
},
|
||||
|
||||
getSession: function (callback) {
|
||||
var cipher = CryptoJS.lib.PasswordBasedCipher;
|
||||
var result, pass, instance_tag, saved_key, pass_check;
|
||||
|
Loading…
Reference in New Issue
Block a user