Converse converse.js

Namespace: entities

.disco.entities

Namespace for methods associated with disco entities

Source:

Methods

(static) create(data, optionsopt)

Create a new disco entity. It's identity and features will automatically be fetched from cache or from the XMPP server.

Fetching from cache can be disabled by passing in ignore_cache: true in the options parameter.

Parameters:
Name Type Attributes Description
data object
Properties
Name Type Description
jid string

The Jabber ID of the entity

parent_jid string

The Jabber ID of the parent entity

name string
options object <optional>

Additional options

Properties
Name Type Attributes Description
ignore_cache boolean <optional>

If true, fetch all features from the XMPP server instead of restoring them from cache

Source:
Example
_converse.api.disco.entities.create({ jid }, {'ignore_cache': true});

(static) create(data, optionsopt)

Create a new disco entity. It's identity and features will automatically be fetched from cache or from the XMPP server.

Fetching from cache can be disabled by passing in ignore_cache: true in the options parameter.

Parameters:
Name Type Attributes Description
data object
Properties
Name Type Description
jid string

The Jabber ID of the entity

parent_jid string

The Jabber ID of the parent entity

name string
options object <optional>

Additional options

Properties
Name Type Attributes Description
ignore_cache boolean <optional>

If true, fetch all features from the XMPP server instead of restoring them from cache

Source:
Example
_converse.api.disco.entities.create({ jid }, {'ignore_cache': true});

(static) get(jid, createopt)

Get the corresponding DiscoEntity instance.

Parameters:
Name Type Attributes Description
jid string

The Jabber ID of the entity

create boolean <optional>

Whether the entity should be created if it doesn't exist.

Source:
Example
_converse.api.disco.entities.get(jid);

(static) get(jid, createopt)

Get the corresponding DiscoEntity instance.

Parameters:
Name Type Attributes Description
jid string

The Jabber ID of the entity

create boolean <optional>

Whether the entity should be created if it doesn't exist.

Source:
Example
_converse.api.disco.entities.get(jid);

(static) items(jid)

Return any disco items advertised on this entity

Parameters:
Name Type Description
jid string

The Jabber ID of the entity for which we want to fetch items

Source:
Example
api.disco.entities.items(jid);

(static) items(jid)

Return any disco items advertised on this entity

Parameters:
Name Type Description
jid string

The Jabber ID of the entity for which we want to fetch items

Source:
Example
api.disco.entities.items(jid);

.disco.entities

Namespace for methods associated with disco entities

Source:

Methods

(static) create(data, optionsopt)

Create a new disco entity. It's identity and features will automatically be fetched from cache or from the XMPP server.

Fetching from cache can be disabled by passing in ignore_cache: true in the options parameter.

Parameters:
Name Type Attributes Description
data object
Properties
Name Type Description
jid string

The Jabber ID of the entity

parent_jid string

The Jabber ID of the parent entity

name string
options object <optional>

Additional options

Properties
Name Type Attributes Description
ignore_cache boolean <optional>

If true, fetch all features from the XMPP server instead of restoring them from cache

Source:
Example
_converse.api.disco.entities.create({ jid }, {'ignore_cache': true});

(static) create(data, optionsopt)

Create a new disco entity. It's identity and features will automatically be fetched from cache or from the XMPP server.

Fetching from cache can be disabled by passing in ignore_cache: true in the options parameter.

Parameters:
Name Type Attributes Description
data object
Properties
Name Type Description
jid string

The Jabber ID of the entity

parent_jid string

The Jabber ID of the parent entity

name string
options object <optional>

Additional options

Properties
Name Type Attributes Description
ignore_cache boolean <optional>

If true, fetch all features from the XMPP server instead of restoring them from cache

Source:
Example
_converse.api.disco.entities.create({ jid }, {'ignore_cache': true});

(static) get(jid, createopt)

Get the corresponding DiscoEntity instance.

Parameters:
Name Type Attributes Description
jid string

The Jabber ID of the entity

create boolean <optional>

Whether the entity should be created if it doesn't exist.

Source:
Example
_converse.api.disco.entities.get(jid);

(static) get(jid, createopt)

Get the corresponding DiscoEntity instance.

Parameters:
Name Type Attributes Description
jid string

The Jabber ID of the entity

create boolean <optional>

Whether the entity should be created if it doesn't exist.

Source:
Example
_converse.api.disco.entities.get(jid);

(static) items(jid)

Return any disco items advertised on this entity

Parameters:
Name Type Description
jid string

The Jabber ID of the entity for which we want to fetch items

Source:
Example
api.disco.entities.items(jid);

(static) items(jid)

Return any disco items advertised on this entity

Parameters:
Name Type Description
jid string

The Jabber ID of the entity for which we want to fetch items

Source:
Example
api.disco.entities.items(jid);