# HG changeset patch # User Kim Alvefur # Date 1577956128 -3600 # Node ID 21ffca4d3aaeda6bf57f507b0c6fb288701459c5 # Parent 802087d3155a65e177643be3ba76103117a39bb0 mod_rest: Document most of JSON mappings diff -r 802087d3155a -r 21ffca4d3aae mod_rest/README.markdown --- 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