2013-04-26 21:01:39 +02:00
.. Converse.js documentation master file, created by
sphinx-quickstart on Fri Apr 26 20:48:03 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. toctree ::
:maxdepth: 2
.. contents :: Table of Contents
:depth: 2
:local:
2013-04-26 21:49:26 +02:00
========================
2013-04-26 21:01:39 +02:00
Configuration variables:
2013-04-26 21:49:26 +02:00
========================
2013-04-20 11:30:18 +02:00
2013-04-26 21:50:57 +02:00
prebind
2013-04-20 11:47:29 +02:00
========
2013-04-20 11:30:18 +02:00
2013-04-25 00:16:16 +02:00
Use this option when you want to attach to an existing XMPP connection that was
already authenticated (usually on the backend before page load).
2013-04-20 11:30:18 +02:00
2013-04-25 00:16:16 +02:00
This is useful when you don't want to render the login form on the chat control
box with each page load.
2013-04-20 11:30:18 +02:00
2013-04-25 00:16:16 +02:00
When set to true, you'll need to make sure that the onConnected method is
called, and passed to it a Strophe connection object.
2013-04-20 11:30:18 +02:00
Besides requiring the back-end to authenticate you, you'll also
have to write a Javascript snippet to attach to the set up connection::
$.JSON({
'url': 'mysite.com/xmpp-authenticate',
'success': function (data) {
2013-04-25 00:16:16 +02:00
connection = new Strophe.Connection(bosh_service_url);
2013-04-20 11:30:18 +02:00
connection.attach(data.jid, data.sid, data.rid, converse.onConnected);
}
2013-04-25 00:16:16 +02:00
The backend must authenticate for you, and then return a SID (session ID) and
RID (Request ID), which you use when you attach to the connection.
2013-04-20 11:30:18 +02:00
fullname
2013-04-20 11:47:29 +02:00
========
2013-04-20 11:30:18 +02:00
If you are using prebinding, you need to specify the fullname of the currently
logged in user.
2013-04-25 00:16:16 +02:00
bosh_service_url
================
Connections to an XMPP server depend on a BOSH connection manager which acts as
a middle man between HTTP and XMPP.
See `here`_ for more information.
2013-04-20 11:30:18 +02:00
xhr_user_search
2013-04-20 11:47:29 +02:00
===============
2013-04-20 11:30:18 +02:00
There are two ways to add users.
* The user inputs a valid JID (Jabber ID), and the user is added as a pending
contact.
* The user inputs some text (for example part of a firstname or lastname), an XHR will be made to a backend, and a list of matches are returned. The user can then choose one of the matches to add as a contact.
This setting enables the second mechanism, otherwise by default the first will
be used.
auto_subscribe
2013-04-20 11:47:29 +02:00
==============
2013-04-20 11:30:18 +02:00
If true, the user will automatically subscribe back to any contact requests.
2013-05-09 15:39:27 +02:00
auto_list_rooms
===============
If true, and the XMPP server on which the current user is logged in supports
multi-user chat, then a list of rooms on that server will be fetched.
Not recommended for servers with lots of chat rooms.
For each room on the server a query is made to fetch further details (e.g.
features, number of occupants etc.), so on servers with many rooms this
option will create lots of extra connection traffic.
2013-04-20 11:30:18 +02:00
animate
2013-04-20 11:47:29 +02:00
=======
2013-04-20 11:30:18 +02:00
Show animations, for example when opening and closing chat boxes.
2013-04-25 00:16:16 +02:00
.. _`here`: http://metajack.im/2008/09/08/which-bosh-server-do-you-need/l