Mercurial > prosody-modules
annotate mod_conversejs/README.markdown @ 4740:beeacb25dea9
mod_rest: Add XEP-0004 mapping for future reuse
For use with MAM and such
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 04 Nov 2021 19:36:11 +0100 |
parents | db58c77a185a |
children | 60887967b797 |
rev | line source |
---|---|
2878 | 1 --- |
4606
d6eb2b722b90
mod_conversejs: Update description
Kim Alvefur <zash@zash.se>
parents:
4208
diff
changeset
|
2 summary: Simplify setup of Converse.js |
2878 | 3 depends: |
4 - 'mod\_bosh' | |
5 - 'mod\_websocket' | |
6 provides: | |
7 - http | |
8 title: 'mod\_conversejs' | |
4166
7678b4880719
mod_conversejs: Hint that templates should be copied into packages
Kim Alvefur <zash@zash.se>
parents:
4147
diff
changeset
|
9 rockspec: |
7678b4880719
mod_conversejs: Hint that templates should be copied into packages
Kim Alvefur <zash@zash.se>
parents:
4147
diff
changeset
|
10 build: |
7678b4880719
mod_conversejs: Hint that templates should be copied into packages
Kim Alvefur <zash@zash.se>
parents:
4147
diff
changeset
|
11 copy_directories: |
7678b4880719
mod_conversejs: Hint that templates should be copied into packages
Kim Alvefur <zash@zash.se>
parents:
4147
diff
changeset
|
12 - templates |
4634
db58c77a185a
mod_conversejs: Add dependency on mod_bookmarks [rockspec]
Kim Alvefur <zash@zash.se>
parents:
4606
diff
changeset
|
13 dependencies: |
db58c77a185a
mod_conversejs: Add dependency on mod_bookmarks [rockspec]
Kim Alvefur <zash@zash.se>
parents:
4606
diff
changeset
|
14 - mod_bookmarks |
2878 | 15 --- |
16 | |
17 Introduction | |
18 ============ | |
19 | |
4606
d6eb2b722b90
mod_conversejs: Update description
Kim Alvefur <zash@zash.se>
parents:
4208
diff
changeset
|
20 This module simplifies setup of [Converse.js](https://conversejs.org/) |
d6eb2b722b90
mod_conversejs: Update description
Kim Alvefur <zash@zash.se>
parents:
4208
diff
changeset
|
21 by serving it from Prosodys internal [http server][doc:http] along with |
d6eb2b722b90
mod_conversejs: Update description
Kim Alvefur <zash@zash.se>
parents:
4208
diff
changeset
|
22 generated configuration to match the local VirtualHost. It becomes |
d6eb2b722b90
mod_conversejs: Update description
Kim Alvefur <zash@zash.se>
parents:
4208
diff
changeset
|
23 available on an URL like `https://example.com:5281/conversejs` |
3958
cacd753848b2
mod_conversejs/README: Add an example of the URL to open
Kim Alvefur <zash@zash.se>
parents:
3711
diff
changeset
|
24 |
2878 | 25 Configuration |
26 ============= | |
27 | |
2918
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
28 The module uses general Prosody options for basic configuration. It |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
29 should just work after loading it. |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
30 |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
31 ``` {.lua} |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
32 modules_enabled = { |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
33 -- other modules... |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
34 "conversejs"; |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
35 } |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
36 ``` |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
37 |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
38 Authentication |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
39 -------------- |
2878 | 40 |
2918
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
41 [Authentication settings][doc:authentication] are used determine |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
42 whether to configure Converse.js to use `login` or `anonymous` mode. |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
43 |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
44 Connection methods |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
45 ------------------ |
2878 | 46 |
4206 | 47 mod_conversejs also determines the [BOSH][doc:setting_up_bosh] and |
3362
af085e8b9d48
mod_conversejs: Link to BOSH and WebSockets setup instructions instead of module pages
Kim Alvefur <zash@zash.se>
parents:
3334
diff
changeset
|
48 [WebSocket][doc:websocket] URL automatically, see their respective |
af085e8b9d48
mod_conversejs: Link to BOSH and WebSockets setup instructions instead of module pages
Kim Alvefur <zash@zash.se>
parents:
3334
diff
changeset
|
49 documentation for how to configure them. Both connection methods are |
af085e8b9d48
mod_conversejs: Link to BOSH and WebSockets setup instructions instead of module pages
Kim Alvefur <zash@zash.se>
parents:
3334
diff
changeset
|
50 loaded automatically. |
2918
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
51 |
4207
e8fbc0773141
mod_conversejs/README: Add text about preventing auto-load of mod_bosh/ws
Kim Alvefur <zash@zash.se>
parents:
4206
diff
changeset
|
52 Auto-loading of `mod_bosh` or `mod_websocket` can be prevented by adding |
e8fbc0773141
mod_conversejs/README: Add text about preventing auto-load of mod_bosh/ws
Kim Alvefur <zash@zash.se>
parents:
4206
diff
changeset
|
53 it to `modules_disabled` but note that at least one of them must be |
e8fbc0773141
mod_conversejs/README: Add text about preventing auto-load of mod_bosh/ws
Kim Alvefur <zash@zash.se>
parents:
4206
diff
changeset
|
54 allowed for Converse.js to work. |
e8fbc0773141
mod_conversejs/README: Add text about preventing auto-load of mod_bosh/ws
Kim Alvefur <zash@zash.se>
parents:
4206
diff
changeset
|
55 |
2918
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
56 HTTP |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
57 ---- |
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
58 |
3304 | 59 The module is served on Prosody's default HTTP ports at the path |
60 `/conversejs`. More details on configuring HTTP modules in Prosody can | |
61 be found in our [HTTP documentation](http://prosody.im/doc/http). | |
2878 | 62 |
3598
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
63 ## Templates |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
64 |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
65 The HTML and JS can be customized either by editing the included |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
66 `template.html` and `template.js` files or configuring your own like: |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
67 |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
68 ```lua |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
69 conversejs_html_template = "/path/to/my-template.html" |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
70 conversejs_js_template = "/path/to/my-template.js" |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
71 ``` |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
72 |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
73 The HTML template uses Prosodys |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
74 [`util.interpolation`][doc:developers:util:interpolation] template |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
75 library while the JS template has `%s` where generated settings are |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
76 injected. |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
77 |
2919
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
78 Other |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
79 ----- |
2878 | 80 |
2919
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
81 To pass [other Converse.js |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
82 options](https://conversejs.org/docs/html/configuration.html), or |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
83 override the derived settings, one can set `conversejs_options` like |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
84 this: |
2918
d2d0715f30d9
mod_conversejs/README: Expand config section
Kim Alvefur <zash@zash.se>
parents:
2878
diff
changeset
|
85 |
2919
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
86 ``` {.lua} |
3304 | 87 conversejs_options = { |
2919
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
88 debug = true; |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
89 view_mode = "fullscreen"; |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
90 } |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
91 ``` |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
92 |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
93 Note that the following options are automatically provided, and |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
94 **overriding them may cause problems**: |
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
95 |
3334
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
96 - `authentication` *based on Prosody's authentication settings* |
2919
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
97 - `bosh_service_url` |
3495
5567098a7f91
mod_conversejs/README: Update text about mod_bosh and mod_websocket
Kim Alvefur <zash@zash.se>
parents:
3362
diff
changeset
|
98 - `websocket_url` |
4208
b74d6a3f0c3f
mod_conversejs/README: Complete list of auto-injected settings
Kim Alvefur <zash@zash.se>
parents:
4207
diff
changeset
|
99 - `discover_connection_methods` *Disabled since we provide this* |
b74d6a3f0c3f
mod_conversejs/README: Complete list of auto-injected settings
Kim Alvefur <zash@zash.se>
parents:
4207
diff
changeset
|
100 - `assets_path` |
b74d6a3f0c3f
mod_conversejs/README: Complete list of auto-injected settings
Kim Alvefur <zash@zash.se>
parents:
4207
diff
changeset
|
101 - `allow_registration` *based on whether registration is enabled* |
b74d6a3f0c3f
mod_conversejs/README: Complete list of auto-injected settings
Kim Alvefur <zash@zash.se>
parents:
4207
diff
changeset
|
102 - These settings are set to the current `VirtualHost`: |
b74d6a3f0c3f
mod_conversejs/README: Complete list of auto-injected settings
Kim Alvefur <zash@zash.se>
parents:
4207
diff
changeset
|
103 - `jid` |
b74d6a3f0c3f
mod_conversejs/README: Complete list of auto-injected settings
Kim Alvefur <zash@zash.se>
parents:
4207
diff
changeset
|
104 - `default_domain` |
b74d6a3f0c3f
mod_conversejs/README: Complete list of auto-injected settings
Kim Alvefur <zash@zash.se>
parents:
4207
diff
changeset
|
105 - `domain_placeholder` |
b74d6a3f0c3f
mod_conversejs/README: Complete list of auto-injected settings
Kim Alvefur <zash@zash.se>
parents:
4207
diff
changeset
|
106 - `registration_domain` |
3495
5567098a7f91
mod_conversejs/README: Update text about mod_bosh and mod_websocket
Kim Alvefur <zash@zash.se>
parents:
3362
diff
changeset
|
107 |
5567098a7f91
mod_conversejs/README: Update text about mod_bosh and mod_websocket
Kim Alvefur <zash@zash.se>
parents:
3362
diff
changeset
|
108 `mod_bosh` and/or `mod_websocket` are automatically enabled if available |
5567098a7f91
mod_conversejs/README: Update text about mod_bosh and mod_websocket
Kim Alvefur <zash@zash.se>
parents:
3362
diff
changeset
|
109 and the respective endpoint is included in the generated options. |
2919
0ea93da47db9
mod_conversejs: Allow passing arbitrary options trough to Converse.js
Kim Alvefur <zash@zash.se>
parents:
2918
diff
changeset
|
110 |
4147
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
111 ## Loading resources |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
112 |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
113 By default the module will load the main script and CSS from |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
114 cdn.conversejs.org. For privacy or performance reasons you may want to |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
115 load the scripts from somewhere else. |
3334
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
116 |
4147
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
117 To use a local distribution or build of Converse.js set |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
118 conversejs_resources to the local path of "dist" directory: |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
119 |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
120 ``` {.lua} |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
121 conversejs_resources = "/usr/src/conversejs/dist"; |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
122 ``` |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
123 |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
124 To use a different web server or CDN simply use the conversejs_cdn |
3a06dea21ea1
mod_conversejs: Enable serving resources from built-in http server
Kim Alvefur <zash@zash.se>
parents:
3958
diff
changeset
|
125 option: |
3334
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
126 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
127 ``` {.lua} |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
128 conversejs_cdn = "https://cdn.example.com" |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
129 ``` |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
130 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
131 To select a specific version of Converse.js, you may override the version: |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
132 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
133 ``` {.lua} |
3643
740870196b97
mod_http_stats_stream: Make global to simplify
Kim Alvefur <zash@zash.se>
parents:
3598
diff
changeset
|
134 conversejs_version = "5.0.0" |
3334
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
135 ``` |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
136 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
137 Note that versions other than the default may not have been tested with this module, and may include incompatible changes. |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
138 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
139 Finally, if you can override all of the above and just specify links directly to the CSS and JS files: |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
140 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
141 ``` {.lua} |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
142 conversejs_script = "https://example.com/my-converse.js" |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
143 conversejs_css = "https://example.com/my-converse.css" |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
144 ``` |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
145 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
146 Additional tags |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
147 --------------- |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
148 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
149 To add additional tags to the module, such as custom CSS or scripts, you may use the conversejs_tags option: |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
150 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
151 ``` {.lua} |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
152 conversejs_tags = { |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
153 -- Load custom CSS |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
154 [[<link rel="stylesheet" href="https://example.org/css/custom.css">]]; |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
155 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
156 -- Load libsignal-protocol.js for OMEMO support (GPLv3; be aware of licence implications) |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
157 [[<script src="https://cdn.conversejs.org/3rdparty/libsignal-protocol.min.js"></script>]]; |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
158 } |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
159 ``` |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
160 |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
161 The example above uses the `[[` and `]]` syntax simply because it will not conflict with any embedded quotes. |
04e5e34893e1
mod_conversejs: Update README
Matthew Wild <mwild1@gmail.com>
parents:
3311
diff
changeset
|
162 |
2920
4d03ac2737ab
mod_conversejs/README: Add compatibility section
Kim Alvefur <zash@zash.se>
parents:
2919
diff
changeset
|
163 Compatibility |
4d03ac2737ab
mod_conversejs/README: Add compatibility section
Kim Alvefur <zash@zash.se>
parents:
2919
diff
changeset
|
164 ============= |
4d03ac2737ab
mod_conversejs/README: Add compatibility section
Kim Alvefur <zash@zash.se>
parents:
2919
diff
changeset
|
165 |
3598
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
166 Prosody version state |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
167 ----------------- --------------- |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
168 0.9 Does not work |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
169 0.10 Should work |
3711
309fa523c424
mod_conversejs: Update compatibility section, pretty sure it works with 0.11
Kim Alvefur <zash@zash.se>
parents:
3643
diff
changeset
|
170 0.11 Works |
3598
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
3495
diff
changeset
|
171 trunk Works |