Software /
code /
prosody-modules
Comparison
mod_muc_badge/README.md @ 6003:fe081789f7b5
All community modules: Unify file extention of Markdown files to .md
author | Menel <menel@snikket.de> |
---|---|
date | Tue, 22 Oct 2024 10:26:01 +0200 |
parent | 3298:mod_muc_badge/README.markdown@a646fcb45334 |
comparison
equal
deleted
inserted
replaced
6002:5a65a632d5b9 | 6003:fe081789f7b5 |
---|---|
1 --- | |
2 depends: | |
3 - 'mod\_http' | |
4 - 'mod\_muc' | |
5 provides: | |
6 - http | |
7 title: 'mod\_muc\_badge' | |
8 --- | |
9 | |
10 # Introduction | |
11 | |
12 This module generates a badge for MUC rooms at a HTTP URL like | |
13 `https://conference.example.com:5281/muc_badge/room@conference.example.org` | |
14 containing the number of occupants. | |
15 | |
16 Inspiration | |
17 : <https://opkode.com/blog/xmpp-chat-badge/> | |
18 | |
19 # Configuration | |
20 | |
21 Option Type Default | |
22 ------------------ -------- -------------------------- | |
23 `badge_count` string `"%d online"` | |
24 `badge_template` string A SVG image (see source) | |
25 | |
26 The template must be valid XML. If it contains `{label}` then this is | |
27 replaced by `badge_label`, similarly, `{count}` is substituted by | |
28 `badge_count` with `%d` changed to the number of occupants. | |
29 | |
30 Details of the HTTP URL is determined by [standard Prosody HTTP server | |
31 configuration][doc:http]. | |
32 | |
33 # Example | |
34 | |
35 ```lua | |
36 Component "conference.example.com" "muc" | |
37 modules_enabled = { | |
38 "muc_badge" | |
39 } | |
40 ``` |