Add 'connection' API grouping and 'connected' API method.
This commit is contained in:
parent
556d264747
commit
a6b6ad5e9e
@ -378,6 +378,22 @@ message, pass in the ``before`` parameter with an empty string value ``''``.
|
|||||||
converse.archive.query(rsm, callback, errback);
|
converse.archive.query(rsm, callback, errback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
The "connection" grouping
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
This grouping collects API functions related to the XMPP connection.
|
||||||
|
|
||||||
|
connected
|
||||||
|
~~~~~~~~~
|
||||||
|
|
||||||
|
Returns a boolean value (`true` or `false`) depending on whether there is an
|
||||||
|
established connection.
|
||||||
|
|
||||||
|
disconnect
|
||||||
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
Terminates the connection.
|
||||||
|
|
||||||
|
|
||||||
The "user" grouping
|
The "user" grouping
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -25,8 +25,13 @@
|
|||||||
'initialize': function (settings, callback) {
|
'initialize': function (settings, callback) {
|
||||||
converse.initialize(settings, callback);
|
converse.initialize(settings, callback);
|
||||||
},
|
},
|
||||||
'disconnect': function () {
|
'connection': {
|
||||||
converse.connection.disconnect();
|
'connected': function () {
|
||||||
|
return converse.connection.connected;
|
||||||
|
},
|
||||||
|
'disconnect': function () {
|
||||||
|
converse.connection.disconnect();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'user': {
|
'user': {
|
||||||
'logout': function () {
|
'logout': function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user