Remove the use_vcards
settings
VCards will now always be used.
This commit is contained in:
parent
6ac1df43e1
commit
09c55ebc28
@ -24,6 +24,7 @@
|
||||
|
||||
## Configuration changes
|
||||
|
||||
- Removed the `use_vcards` configuration setting, instead VCards are always used.
|
||||
- Removed the `xhr_custom_status` and `xhr_custom_status_url` configuration
|
||||
settings. If you relied on these settings, you can instead listen for the
|
||||
[statusMessageChanged](https://conversejs.org/docs/html/events.html#contactstatusmessagechanged)
|
||||
|
@ -1371,15 +1371,6 @@ use_otr_by_default
|
||||
If set to ``true``, Converse.js will automatically try to initiate an OTR (off-the-record)
|
||||
encrypted chat session every time you open a chatbox.
|
||||
|
||||
use_vcards
|
||||
----------
|
||||
|
||||
* Default: ``true``
|
||||
|
||||
Determines whether the XMPP server will be queried for roster contacts' VCards
|
||||
or not. VCards contain extra personal information such as your fullname and
|
||||
avatar image.
|
||||
|
||||
visible_toolbar_buttons
|
||||
-----------------------
|
||||
|
||||
|
@ -52,26 +52,17 @@
|
||||
*/
|
||||
const to = Strophe.getBareJidFromJid(jid) === _converse.bare_jid ? null : jid;
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!_converse.use_vcards) {
|
||||
if (resolve) { resolve({'jid': jid}); }
|
||||
} else {
|
||||
_converse.connection.vcard.get(
|
||||
_.partial(onVCardData, _converse, jid, _, resolve),
|
||||
to,
|
||||
_.partial(onVCardError, _converse, jid, _, resolve)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
converse.plugins.add('converse-vcard', {
|
||||
|
||||
enabled (_converse) {
|
||||
_converse.api.settings.update({'use_vcards': true});
|
||||
return _converse.use_vcards;
|
||||
},
|
||||
|
||||
overrides: {
|
||||
// Overrides mentioned here will be picked up by converse.js's
|
||||
// plugin architecture they will replace existing methods on the
|
||||
@ -106,7 +97,7 @@
|
||||
model: _converse.ModelWithDefaultAvatar,
|
||||
|
||||
initialize () {
|
||||
this.on('add', (model) => _converse.api.vcard.update(model));
|
||||
this.on('add', (vcard) => _converse.api.vcard.update(vcard));
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user