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

Ensure that roster contact's jids are bare

parent 9db289df
......@@ -3483,9 +3483,12 @@
this.RosterContact = Backbone.Model.extend({
initialize: function (attributes, options) {
var jid = attributes.jid;
var bare_jid = Strophe.getBareJidFromJid(jid);
attributes.jid = bare_jid;
this.set(_.extend({
'id': Strophe.getBareJidFromJid(jid),
'fullname': jid,
'id': bare_jid,
'jid': bare_jid,
'fullname': bare_jid,
'chat_status': 'offline',
'user_id': Strophe.getNodeFromJid(jid),
'resources': [Strophe.getResourceFromJid(jid)],
......
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