- Source:
Methods
(static) get(feature, jid) → {promise}
Return a given feature of a disco entity
Parameters:
Name | Type | Description |
---|---|---|
feature |
string | The feature that might be
supported. In the XML stanza, this is the |
jid |
string | The JID of the entity (and its associated items) which should be queried |
- Source:
Returns:
A promise which resolves with a list containing _converse.Entity instances representing the entity itself or those items associated with the entity if they support the given feature.
- Type
- promise
Example
api.disco.features.get(Strophe.NS.MAM, _converse.bare_jid);
(static) get(feature, jid) → {promise}
Return a given feature of a disco entity
Parameters:
Name | Type | Description |
---|---|---|
feature |
string | The feature that might be
supported. In the XML stanza, this is the |
jid |
string | The JID of the entity (and its associated items) which should be queried |
Returns:
A promise which resolves with a list containing _converse.Entity instances representing the entity itself or those items associated with the entity if they support the given feature.
- Type
- promise
Example
api.disco.features.get(Strophe.NS.MAM, _converse.bare_jid);
(static) has(feature, jid) → {Promise}
Returns true if an entity with the given JID, or if one of its associated items, supports a given feature.
Parameters:
Name | Type | Description |
---|---|---|
feature |
string | The feature that might be
supported. In the XML stanza, this is the |
jid |
string | The JID of the entity (and its associated items) which should be queried |
- Source:
Returns:
A promise which resolves with a boolean
- Type
- Promise
Example
api.disco.features.has(Strophe.NS.MAM, _converse.bare_jid);
(static) has(feature, jid) → {Promise}
Returns true if an entity with the given JID, or if one of its associated items, supports a given feature.
Parameters:
Name | Type | Description |
---|---|---|
feature |
string | The feature that might be
supported. In the XML stanza, this is the |
jid |
string | The JID of the entity (and its associated items) which should be queried |
Returns:
A promise which resolves with a boolean
- Type
- Promise
Example
api.disco.features.has(Strophe.NS.MAM, _converse.bare_jid);