Commit 447c3a8d authored by ichim-david's avatar ichim-david

Set modifications of model attributes only if the item received from the...

Set modifications of model attributes only if the item received from the rosterHandler has different options
parent 95fdf98e
......@@ -1414,9 +1414,13 @@
if (!model) {
this.addRosterItem(item.jid, item.subscription, item.ask, item.name);
} else {
// only modify model attributes if they are different from the
// ones that were already set when the rosterItem was added
if (model.get('subscription') !== item.subscription || model.get('ask') !== item.ask) {
model.set({'subscription': item.subscription, 'ask': item.ask});
}
}
}
},
presenceHandler: function (presence) {
......
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