Make 'connected' an attribute.

This commit is contained in:
JC Brand 2016-03-29 13:57:33 +00:00
parent a6b6ad5e9e
commit 3815d77cc1
2 changed files with 3 additions and 5 deletions

View File

@ -386,8 +386,8 @@ 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.
A boolean attribute (i.e. not a callable) which is set to `true` or `false` depending
on whether there is an established connection.
disconnect
~~~~~~~~~~

View File

@ -26,9 +26,7 @@
converse.initialize(settings, callback);
},
'connection': {
'connected': function () {
return converse.connection.connected;
},
'connected': converse.connection.connected,
'disconnect': function () {
converse.connection.disconnect();
},