Converse converse.js

Namespace: converse

converse

The Public API

This namespace contains public API methods which are are accessible on the global converse object. They are public, because any JavaScript in the page can call them. Public methods therefore don’t expose any sensitive or closured data. To do that, you’ll need to create a plugin, which has access to the private API method.

Source:

Namespaces

plugins

Members

(static) env

Utility methods and globals from bundled 3rd party libraries.

Properties:
Name Type Description
converse.env.$build function

Creates a Strophe.Builder, for creating stanza objects.

converse.env.$iq function

Creates a Strophe.Builder with an element as the root.

converse.env.$msg function

Creates a Strophe.Builder with an element as the root.

converse.env.$pres function

Creates a Strophe.Builder with an element as the root.

converse.env.Backbone object

The Backbone object used by Converse to create models and views.

converse.env.Promise function

The Promise implementation used by Converse.

converse.env.Strophe function

The Strophe XMPP library used by Converse.

converse.env._ object

The instance of lodash used by Converse.

converse.env.f function

And instance of Lodash with its methods wrapped to produce immutable auto-curried iteratee-first data-last methods.

converse.env.dayjs object

DayJS date manipulation library.

converse.env.sizzle function

Sizzle CSS selector engine.

converse.env.utils object

Module containing common utility methods used by Converse.

Source:

Methods

(static) initialize(config)

Public API method which initializes Converse. This method must always be called when using Converse.

Parameters:
Name Type Description
config object

A map of configuration-settings.

Source:
Example
converse.initialize({
    auto_list_rooms: false,
    auto_subscribe: false,
    bosh_service_url: 'https://bind.example.com',
    hide_muc_server: false,
    i18n: 'en',
    play_sounds: true,
    show_controlbox_by_default: true,
    debug: false,
    roster_groups: true
});