Commit 302c8d42 authored by JC Brand's avatar JC Brand

Move VCard stuff from converse-rosterview to converse-vcard

parent 6506d474
...@@ -286,11 +286,6 @@ ...@@ -286,11 +286,6 @@
onContactAdd: function (contact) { onContactAdd: function (contact) {
this.addRosterContact(contact).update(); this.addRosterContact(contact).update();
if (!contact.get('vcard_updated')) {
// This will update the vcard, which triggers a change
// request which will rerender the roster contact.
converse.getVCard(contact.get('jid'));
}
}, },
onContactChange: function (contact) { onContactChange: function (contact) {
......
...@@ -158,6 +158,18 @@ ...@@ -158,6 +158,18 @@
}; };
converse.on('chatBoxInitialized', updateVCardForChatBox); converse.on('chatBoxInitialized', updateVCardForChatBox);
var onContactAdd = function (contact) {
if (!contact.get('vcard_updated')) {
// This will update the vcard, which triggers a change
// request which will rerender the roster contact.
converse.getVCard(contact.get('jid'));
}
};
converse.on('initialized', function () {
converse.roster.on("add", onContactAdd);
});
var fetchOwnVCard = function () { var fetchOwnVCard = function () {
if (converse.xmppstatus.get('fullname') === undefined) { if (converse.xmppstatus.get('fullname') === undefined) {
converse.getVCard( converse.getVCard(
......
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