Mercurial > prosody-modules
comparison mod_muc_members_json/README.md @ 5692:aa94d5bb6b10
mod_muc_members_json: Expand example config and docs for clarity
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 07 Nov 2023 11:26:36 +0000 |
parents | 1cae6133e315 |
children | 6696075e26e2 |
comparison
equal
deleted
inserted
replaced
5691:78f766372e2c | 5692:aa94d5bb6b10 |
---|---|
38 The `muc_members_json_mucs` setting determines which rooms will be managed by | 38 The `muc_members_json_mucs` setting determines which rooms will be managed by |
39 the plugin, and how to map roles to hats (if desired). | 39 the plugin, and how to map roles to hats (if desired). |
40 | 40 |
41 ``` | 41 ``` |
42 muc_members_json_mucs = { | 42 muc_members_json_mucs = { |
43 - -- This configures hats for the myroom@<this MUC host> MUC | |
43 myroom = { | 44 myroom = { |
45 -- The optional field 'member_hat' defines a hat that will be | |
46 -- added to any user that is listed in the members JSON | |
47 -- (regardless of what roles they have, if any) | |
44 member_hat = { | 48 member_hat = { |
45 id = "urn:uuid:6a1b143a-1c5c-11ee-80aa-4ff1ce4867dc"; | 49 id = "urn:uuid:6a1b143a-1c5c-11ee-80aa-4ff1ce4867dc"; |
46 title = "Cool Member"; | 50 title = "Cool Member"; |
47 }; | 51 }; |
52 -- The optional field 'team_hats' defines one or more hats | |
53 -- that will be assigned to users that have the specified | |
54 -- roles in the JSON. | |
55 team_hats = { | |
56 janitor = { | |
57 id = "urn:uuid:ec32f550-7d5f-11ee-81ee-6b139cac3bf6"; | |
58 title = "Janitor"; | |
59 } | |
60 } | |
48 }; | 61 }; |
49 } | 62 } |
50 ``` | 63 ``` |
51 | 64 |
52 JSON format | 65 JSON format |
67 } | 80 } |
68 ] | 81 ] |
69 } | 82 } |
70 ``` | 83 ``` |
71 | 84 |
72 Each member must have a `jids` field, and optionally a `roles` field. | 85 The JSON format must be an object with a `members` array. |
86 | |
87 Each member must have a `jids` field, and optionally a `roles` field (both are | |
88 arrays of strings). | |
73 | 89 |
74 Compatibility | 90 Compatibility |
75 ============= | 91 ============= |
76 | 92 |
77 ------- ------------------ | 93 ------- ------------------ |