From cf161a729a11ea4d2287e6191b48c500786fca01 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 15 Aug 2013 20:47:19 +0200 Subject: [PATCH] Add contacts regardless of how getVCard failed --- converse.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/converse.js b/converse.js index 26501ce35..2a6187c46 100644 --- a/converse.js +++ b/converse.js @@ -696,12 +696,8 @@ }, this), $.proxy(function (stanza) { console.log("An error occured while fetching vcard"); - if ($(stanza).find('error').attr('code') == '503') { - // If we get service-unavailable, we continue to create - // the user - var jid = $(stanza).attr('from'); - this.addContact(jid, jid); - } + var jid = $(stanza).attr('from'); + this.addContact(jid, jid); }, this)); $('.search-xmpp').hide(); }, @@ -2224,7 +2220,7 @@ this.XMPPStatus = Backbone.Model.extend({ initialize: function () { this.set({ - 'status' : this.get('status') || 'online', + 'status' : this.get('status') || 'online' }); this.on('change', $.proxy(function () { if (this.get('fullname') === undefined) {