Software /
code /
prosody-modules
Changeset
3826:21ffca4d3aae
mod_rest: Document most of JSON mappings
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 02 Jan 2020 10:08:48 +0100 |
parents | 3825:802087d3155a |
children | 3827:7d909976ca88 |
files | mod_rest/README.markdown |
diffstat | 1 files changed, 38 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_rest/README.markdown Thu Jan 02 09:59:31 2020 +0100 +++ b/mod_rest/README.markdown Thu Jan 02 10:08:48 2020 +0100 @@ -146,7 +146,44 @@ } ``` -Mapping of various XMPP stanza payloads to JSON. +Further JSON object keys as follows: + +#### Messages + +`body` +: Human-readable message text. + +`subject` +: Message subject or MUC topic. + +`html` +: HTML. + +`oob_url` +: URL of an out-of-band resource, often used for images. + +#### Presence + +`show` +: [Online + status](https://xmpp.org/rfcs/rfc6121.html#presence-syntax-children-show), + `away`, `dnd` etc. + +`status` +: Human-readable status message. + +`join` +: Boolean. Join a group chat. + +#### Info-Queries + +Only one type of payload can be included in an `iq`. + +`ping` +: Send a ping. Get a pong. Maybe. + +`disco` +: Retrieve service discovery information about an entity. ### XML