Move VCard stuff from converse-rosterview to converse-vcard

This commit is contained in:
JC Brand 2016-03-16 13:50:52 +00:00
parent 6506d4745a
commit 302c8d42d8
2 changed files with 12 additions and 5 deletions

View File

@ -286,11 +286,6 @@
onContactAdd: function (contact) {
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) {

View File

@ -158,6 +158,18 @@
};
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 () {
if (converse.xmppstatus.get('fullname') === undefined) {
converse.getVCard(