Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
a6b6ad5e
Commit
a6b6ad5e
authored
Mar 29, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'connection' API grouping and 'connected' API method.
parent
556d2647
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
docs/source/development.rst
docs/source/development.rst
+16
-0
src/converse-api.js
src/converse-api.js
+7
-2
No files found.
docs/source/development.rst
View file @
a6b6ad5e
...
...
@@ -378,6 +378,22 @@ message, pass in the ``before`` parameter with an empty string value ``''``.
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
-------------------
...
...
src/converse-api.js
View file @
a6b6ad5e
...
...
@@ -25,9 +25,14 @@
'
initialize
'
:
function
(
settings
,
callback
)
{
converse
.
initialize
(
settings
,
callback
);
},
'
connection
'
:
{
'
connected
'
:
function
()
{
return
converse
.
connection
.
connected
;
},
'
disconnect
'
:
function
()
{
converse
.
connection
.
disconnect
();
},
},
'
user
'
:
{
'
logout
'
:
function
()
{
converse
.
logOut
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment