comparison mod_muc_http_defaults/README.markdown @ 4453:0508822361eb

mod_muc_http_defaults: Expand documentation on expected API response
author Kim Alvefur <zash@zash.se>
date Sat, 20 Feb 2021 20:17:18 +0100
parents 6086fcf20da8
children 89e54247ade6
comparison
equal deleted inserted replaced
4452:6086fcf20da8 4453:0508822361eb
33 33
34 A RESTful JSON API is used. Any error causes the room to be destroyed. 34 A RESTful JSON API is used. Any error causes the room to be destroyed.
35 35
36 The returned JSON consists of two main parts, the room configuration and 36 The returned JSON consists of two main parts, the room configuration and
37 the affiliations (member list). 37 the affiliations (member list).
38
39 ## Room Configuration
40
41 The top level `config` field contains a map of properties corresponding
42 to the fields in the room configuration dialog, named similarly to the
43 [room configuration default][doc:modules:mod_muc#room-configuration-defaults] in
44 Prosodys config file.
45
46 | Property | Type | Description |
47 |------------------------|---------|---------------------------------------------------------------------------|
48 | `name` | string | Name of the chat |
49 | `description` | string | Longer description of the chat |
50 | `language` | string | Language code |
51 | `persistent` | boolean | Whether the room should keep existing if it becomes empty |
52 | `public` | boolean | `true` to include in public listing |
53 | `members_only` | boolean | Membership or open |
54 | `allow_member_invites` | boolean | If members can invite others into members-only rooms |
55 | `public_jids` | boolean | If everyone or only moderators should see real identities |
56 | `subject` | string | In-room subject or topic message |
57 | `changesubject` | boolean | If `true` then everyone can change the subject, otherwise only moderators |
58 | `historylength` | integer | Number of messages to keep in memory (legacy method) |
59 | `moderated` | boolean | New participants start without voice privileges if set to `true` |
60 | `archiving` | boolean | Whether [archiving][doc:modules:mod_muc_mam] is enabled |
61
62 ## Affiliations
63
64 The list of members go in `affiliations` which is either an object
65 mapping addresses to affiliations (e.g. `{"user@host":"admin"}`{.json}),
66 or it can be an array of address, affiliation and optionally a reserved
67 nickname (e.g.
68 `[{"jid":"user@host","affiliation":"member","nick":"joe"}]`{.json}).
38 69
39 ## Schema 70 ## Schema
40 71
41 Here's a JSON Schema in YAML format describing the expected JSON 72 Here's a JSON Schema in YAML format describing the expected JSON
42 response data: 73 response data: