From 3815d77cc1fa271ee0969c34213592a414d8aac0 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Tue, 29 Mar 2016 13:57:33 +0000 Subject: [PATCH] Make 'connected' an attribute. --- docs/source/development.rst | 4 ++-- src/converse-api.js | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) 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(); },