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
b0de7948
Commit
b0de7948
authored
Aug 21, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the update to the rooms API.
parent
b8aaf751
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
docs/CHANGES.md
docs/CHANGES.md
+1
-0
docs/source/development.rst
docs/source/development.rst
+15
-4
No files found.
docs/CHANGES.md
View file @
b0de7948
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
## 1.0.7 (Unreleased)
## 1.0.7 (Unreleased)
-
Continuously attempt to resurrect dead connections when
`auto_reconnect`
is
`true`
. [jcbrand]
-
Continuously attempt to resurrect dead connections when
`auto_reconnect`
is
`true`
. [jcbrand]
-
Update the 'rooms' API to allow user to pass in room attributes. [jcbrand]
-
Add new configuration setting
[
message_storage
](
https://conversejs.org/docs/html/configuration.html#message_storage
)
[
jcbrand
]
-
Add new configuration setting
[
message_storage
](
https://conversejs.org/docs/html/configuration.html#message_storage
)
[
jcbrand
]
-
Hardcode the storage for roster contacts and chatroom occupants to
`sessionStorage`
. [jcbrand]
-
Hardcode the storage for roster contacts and chatroom occupants to
`sessionStorage`
. [jcbrand]
...
...
docs/source/development.rst
View file @
b0de7948
...
@@ -656,14 +656,19 @@ Returns an object representing a multi user chat box (room).
...
@@ -656,14 +656,19 @@ Returns an object representing a multi user chat box (room).
It takes 3 parameters:
It takes 3 parameters:
* the room JID (if not specified, all rooms will be returned).
* the room JID (if not specified, all rooms will be returned).
* the user's nickname (if not specified, the node part of the user's JID will be used).
* a map (object) containing any extra room attributes For example, if you want
* boolean, indicating whether the room should be created if not found (default: `false`)
to specify the nickname, use ``{'nick': 'bloodninja'}``. Previously (before
version 1.0.7, the second parameter only accepted the nickname (as a string
value). This is currently still accepted, but then you can't pass in any
other room attributes. If the nickname is not specified then the node part of
the user's JID will be used.
* a boolean, indicating whether the room should be created if not found (default: `false`)
.. code-block:: javascript
.. code-block:: javascript
var nick = 'dread-pirate-roberts';
var nick = 'dread-pirate-roberts';
var create_if_not_found = true;
var create_if_not_found = true;
converse.rooms.open('group@muc.example.com',
nick
, create_if_not_found)
converse.rooms.open('group@muc.example.com',
{'nick': nick}
, create_if_not_found)
open
open
~~~~
~~~~
...
@@ -671,6 +676,12 @@ open
...
@@ -671,6 +676,12 @@ open
Opens a multi user chat box and returns an object representing it.
Opens a multi user chat box and returns an object representing it.
Similar to chats.get API
Similar to chats.get API
It takes 2 parameters:
* the room JID (if not specified, all rooms will be returned).
* a map (object) containing any extra room attributes. For example, if you want
to specify the nickname, use ``{'nick': 'bloodninja'}``.
To open a single multi user chat box, provide the JID of the room:
To open a single multi user chat box, provide the JID of the room:
.. code-block:: javascript
.. code-block:: javascript
...
@@ -687,7 +698,7 @@ To setup a custom nickname when joining the room, provide the optional nick argu
...
@@ -687,7 +698,7 @@ To setup a custom nickname when joining the room, provide the optional nick argu
.. code-block:: javascript
.. code-block:: javascript
converse.rooms.open('group@muc.example.com',
'mycustomnick'
)
converse.rooms.open('group@muc.example.com',
{'nick': 'mycustomnick'}
)
close
close
~~~~~
~~~~~
...
...
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