comparison mod_muc_members_json/README.md @ 5586:30b9f78b5058

mod_muc_members_json: New module to import MUC membership from a JSON URL
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 Jul 2023 01:25:44 +0100
parents
children 31e56562f9bd
comparison
equal deleted inserted replaced
5585:5b316088bef5 5586:30b9f78b5058
1 ---
2 labels:
3 - 'Stage-Beta'
4 summary: 'Import MUC membership info from a JSON file'
5 ...
6
7 Introduction
8 ============
9
10 This module allows you to import MUC membership information from an external
11 URL in JSON format.
12
13 Details
14 =======
15
16 If you have an organization or community and lots of members and/or channels,
17 it can be frustrating to manage MUC affiliations manually. This module will
18 fetch a JSON file from a configured URL, and use that to automatically set the
19 MUC affiliations.
20
21 It also supports hats/badges.
22
23 Configuration
24 =============
25
26 Add the module to the MUC host (not the global modules\_enabled):
27
28 Component "conference.example.com" "muc"
29 modules_enabled = { "muc_members_json" }
30
31 You can define (globally or per-MUC component) the following options:
32
33 Name Description
34 --------------------- --------------------------------------------------
35 muc_members_json_url The URL to the JSON file describing memberships
36 muc_members_json_mucs The MUCs to manage, and their associated configuration
37
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).
40
41 ```
42 muc_members_json_mucs = {
43 myroom = {
44 member_hat = {
45 id = "urn:uuid:6a1b143a-1c5c-11ee-80aa-4ff1ce4867dc";
46 title = "Cool Member";
47 };
48 };
49 }
50 ```
51
52 JSON format
53 ===========
54
55 ```
56 {
57 "members": [
58 {
59 "jids": ["user@example.com"]
60 },
61 {
62 "jids": ["user2@example.com"]
63 },
64 {
65 "jids": ["user3@example.com"],
66 roles: ["janitor"]
67 }
68 ]
69 }
70 ```
71
72 Each member must have a `jids` field, and optionally a `roles` field.
73
74 Compatibility
75 =============
76
77 ------- ------------------
78 trunk Works
79 0.12 Works
80 ------- ------------------
81