Changeset

5715: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 5714:78f766372e2c
children 5716:6696075e26e2
files mod_muc_members_json/README.md
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_members_json/README.md	Sun Nov 05 21:06:23 2023 +0100
+++ b/mod_muc_members_json/README.md	Tue Nov 07 11:26:36 2023 +0000
@@ -40,11 +40,24 @@
 
 ```
 muc_members_json_mucs = {
+-	-- This configures hats for the myroom@<this MUC host> MUC
 	myroom = {
+		-- The optional field 'member_hat' defines a hat that will be
+		-- added to any user that is listed in the members JSON
+		-- (regardless of what roles they have, if any)
 		member_hat = {
 			id = "urn:uuid:6a1b143a-1c5c-11ee-80aa-4ff1ce4867dc";
 			title = "Cool Member";
 		};
+		-- The optional field 'team_hats' defines one or more hats
+		-- that will be assigned to users that have the specified
+		-- roles in the JSON.
+		team_hats = {
+			janitor = {
+				id = "urn:uuid:ec32f550-7d5f-11ee-81ee-6b139cac3bf6";
+				title = "Janitor";
+			}
+		}
 	};
 }
 ```
@@ -69,7 +82,10 @@
 }
 ```
 
-Each member must have a `jids` field, and optionally a `roles` field.
+The JSON format must be an object with a `members` array.
+
+Each member must have a `jids` field, and optionally a `roles` field (both are
+arrays of strings).
 
 Compatibility
 =============