1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-05 17:15:04 -05:00

Fix: remove contact

This commit is contained in:
Sébastien Hut 2015-04-04 15:56:22 +02:00 committed by Sébastien Hut
parent d3e62ea906
commit b5b07d07b8

View File

@ -173,9 +173,12 @@ module.exports = HumanModel.define({
}
},
removeContact: function (jid) {
var contact = this.getContact(jid);
this.contacts.remove(contact.jid);
app.storage.roster.remove(contact.storageId);
var self = this;
client.removeRosterItem(jid, function(err, res) {
var contact = self.getContact(jid);
self.contacts.remove(contact.jid);
app.storage.roster.remove(contact.storageId);
});
},
load: function () {
if (!this.jid.bare) return;