diff --git a/docs/source/development.rst b/docs/source/development.rst index 1b0d53147..ea446e38c 100644 --- a/docs/source/development.rst +++ b/docs/source/development.rst @@ -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 ~~~~~~~~~~ diff --git a/src/converse-api.js b/src/converse-api.js index 003af30c3..f856b8a05 100644 --- a/src/converse-api.js +++ b/src/converse-api.js @@ -26,9 +26,7 @@ converse.initialize(settings, callback); }, 'connection': { - 'connected': function () { - return converse.connection.connected; - }, + 'connected': converse.connection.connected, 'disconnect': function () { converse.connection.disconnect(); },