Mercurial > prosody-modules
comparison mod_conversejs/README.markdown @ 3334:04e5e34893e1
mod_conversejs: Update README
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 27 Sep 2018 12:19:21 +0100 |
parents | 5b3347056f07 |
children | af085e8b9d48 |
comparison
equal
deleted
inserted
replaced
3333:5be90562e14b | 3334:04e5e34893e1 |
---|---|
64 ``` | 64 ``` |
65 | 65 |
66 Note that the following options are automatically provided, and | 66 Note that the following options are automatically provided, and |
67 **overriding them may cause problems**: | 67 **overriding them may cause problems**: |
68 | 68 |
69 - `authentication` *based on Prosodys authentication settings* | 69 - `authentication` *based on Prosody's authentication settings* |
70 - `jid` *the current `VirtualHost`* | 70 - `jid` *the current `VirtualHost`* |
71 - `bosh_service_url` | 71 - `bosh_service_url` |
72 - `websocket_url` *if `mod_websocket` is available* | 72 - `websocket_url` *if `mod_websocket` is available* |
73 | |
74 Loading resources | |
75 ----------------- | |
76 | |
77 By default the module will load the main script and CSS from cdn.conversejs.org. For privacy or performance | |
78 reasons you may want to load the scripts from somewhere else, simply use the conversejs_cdn option: | |
79 | |
80 ``` {.lua} | |
81 conversejs_cdn = "https://cdn.example.com" | |
82 ``` | |
83 | |
84 To select a specific version of Converse.js, you may override the version: | |
85 | |
86 ``` {.lua} | |
87 conversejs_version = "4.0.1" | |
88 ``` | |
89 | |
90 Note that versions other than the default may not have been tested with this module, and may include incompatible changes. | |
91 | |
92 Finally, if you can override all of the above and just specify links directly to the CSS and JS files: | |
93 | |
94 ``` {.lua} | |
95 conversejs_script = "https://example.com/my-converse.js" | |
96 conversejs_css = "https://example.com/my-converse.css" | |
97 ``` | |
98 | |
99 Additional tags | |
100 --------------- | |
101 | |
102 To add additional tags to the module, such as custom CSS or scripts, you may use the conversejs_tags option: | |
103 | |
104 ``` {.lua} | |
105 conversejs_tags = { | |
106 -- Load custom CSS | |
107 [[<link rel="stylesheet" href="https://example.org/css/custom.css">]]; | |
108 | |
109 -- Load libsignal-protocol.js for OMEMO support (GPLv3; be aware of licence implications) | |
110 [[<script src="https://cdn.conversejs.org/3rdparty/libsignal-protocol.min.js"></script>]]; | |
111 } | |
112 ``` | |
113 | |
114 The example above uses the `[[` and `]]` syntax simply because it will not conflict with any embedded quotes. | |
73 | 115 |
74 Compatibility | 116 Compatibility |
75 ============= | 117 ============= |
76 | 118 |
77 Should work with Prosody 0.9 and later. Websocket support requires 0.10. | 119 Should work with Prosody 0.9 and later. Websocket support requires 0.10. |