Commit 57aae4ad authored by JC Brand's avatar JC Brand

Mention `send` API command and fix formatting.

parent 49d58d32
...@@ -202,6 +202,23 @@ Example: ...@@ -202,6 +202,23 @@ Example:
roster_groups: true roster_groups: true
}); });
send
----
Allows you to send XML stanzas.
For example, to send a message stanza:
.. code-block:: javascript
var msg = converse.env.$msg({
from: 'juliet@example.com/balcony',
to:'romeo@example.net',
type:'chat'
});
converse.send(msg);
The "archive" grouping The "archive" grouping
---------------------- ----------------------
...@@ -229,7 +246,6 @@ It accepts the following optional parameters: ...@@ -229,7 +246,6 @@ It accepts the following optional parameters:
Examples Examples
^^^^^^^^ ^^^^^^^^
**Requesting all archived messages** **Requesting all archived messages**
The simplest query that can be made is to simply not pass in any parameters. The simplest query that can be made is to simply not pass in any parameters.
...@@ -250,6 +266,7 @@ the returned messages. ...@@ -250,6 +266,7 @@ the returned messages.
} }
converse.archive.query(callback, errback)) converse.archive.query(callback, errback))
**Waiting until server support has been determined** **Waiting until server support has been determined**
The query method will only work if converse.js has been able to determine that The query method will only work if converse.js has been able to determine that
...@@ -666,7 +683,7 @@ Returns a token, either the RID or SID token depending on what's asked for. ...@@ -666,7 +683,7 @@ Returns a token, either the RID or SID token depending on what's asked for.
Example: Example:
.. code-block:: javascript .. code-block:: javascript
converse.tokens.get('rid') converse.tokens.get('rid')
...@@ -691,7 +708,7 @@ grouping: ...@@ -691,7 +708,7 @@ grouping:
For example: For example:
.. code-block:: javascript .. code-block:: javascript
converse.listen.on('message', function (event, messageXML) { ... }); converse.listen.on('message', function (event, messageXML) { ... });
...@@ -707,7 +724,7 @@ grouping: ...@@ -707,7 +724,7 @@ grouping:
For example: For example:
.. code-block:: javascript .. code-block:: javascript
converse.listen.once('message', function (event, messageXML) { ... }); converse.listen.once('message', function (event, messageXML) { ... });
...@@ -722,7 +739,7 @@ grouping: ...@@ -722,7 +739,7 @@ grouping:
For example: For example:
.. code-block:: javascript .. code-block:: javascript
converse.listen.not('message', function (event, messageXML) { ... }); converse.listen.not('message', function (event, messageXML) { ... });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment