ConverseJS fixes and documentation:
* using version 7.0.4 * update documentation and example files * disable discover_connection_methods option
This commit is contained in:
parent
765542ef31
commit
8246e12297
@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.0.3
|
||||||
|
|
||||||
|
### Various changes
|
||||||
|
|
||||||
|
* Using converseJS ^7.0.4
|
||||||
|
* Updating documentation
|
||||||
|
|
||||||
## v1.0.2
|
## v1.0.2
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
11
README.md
11
README.md
@ -108,19 +108,16 @@ You can use the builtin ConverseJS implementation.
|
|||||||
|
|
||||||
#### Custom ConverseJS webchat
|
#### Custom ConverseJS webchat
|
||||||
|
|
||||||
If you want to setup your own webchat with converseJS, here is some tips.
|
If you want to setup your own webchat with converseJS on a different webserver, here is some tips.
|
||||||
|
|
||||||
Once you have a XMPP server that allow anonymous authentication, with bosh
|
Once you have a XMPP server that allow anonymous authentication, with bosh
|
||||||
(or websocket) enabled, you can - for example - setup a html page that looks like
|
(or websocket) enabled, you can - for example - setup a html page that looks like
|
||||||
[this one](documentation/examples/converseJS/index.html). You have of course to
|
[this one](documentation/examples/converseJS/index.html). You have of course to
|
||||||
replace the path /conversejs/7.0.3 with your converseJS path, and replace your_domain
|
replace the path /conversejs/dist with your converseJS path, and replace your_domain
|
||||||
by your actual domain.
|
by your actual domain.
|
||||||
|
|
||||||
NB : there is a bug in the converseJS 7.0.4 release. The dist files don't work.
|
NB: converseJS has an option «discover_connection_methods» to find your server configuration (bosh, websocket, ...).
|
||||||
So if you are not building converseJS yourself, use version 7.0.3 instead.
|
To use it, you have to add a file [/.well-known/host-meta](documentation/examples/converseJS/host-meta).
|
||||||
|
|
||||||
NB: for converseJS to find your server configuration (bosh, websocket, ...),
|
|
||||||
you have to add a file [/.well-known/host-meta](documentation/examples/converseJS/host-meta).
|
|
||||||
Please refer to the converseJS documentation.
|
Please refer to the converseJS documentation.
|
||||||
|
|
||||||
### XMPP Server: Prosody
|
### XMPP Server: Prosody
|
||||||
|
@ -21,7 +21,7 @@ window.initConverse = function initConverse ({
|
|||||||
auto_join_rooms: [
|
auto_join_rooms: [
|
||||||
room
|
room
|
||||||
],
|
],
|
||||||
discover_connection_methods: true,
|
discover_connection_methods: false, // this parameter seems buggy with converseJS 7.0.4
|
||||||
bosh_service_url: boshServiceUrl === '' ? undefined : boshServiceUrl,
|
bosh_service_url: boshServiceUrl === '' ? undefined : boshServiceUrl,
|
||||||
websocket_url: websocketServiceUrl === '' ? undefined : websocketServiceUrl,
|
websocket_url: websocketServiceUrl === '' ? undefined : websocketServiceUrl,
|
||||||
jid: jid,
|
jid: jid,
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta name="description" content="Converse XMPP/Jabber Chat"/>
|
<meta name="description" content="Converse XMPP/Jabber Chat"/>
|
||||||
<link type="text/css" rel="stylesheet" media="screen" href="/conversejs/7.0.3/converse.min.css" />
|
<link type="text/css" rel="stylesheet" media="screen" href="/conversejs/dist/converse.min.css" />
|
||||||
<script src="/conversejs/7.0.3/converse.min.js"></script>
|
<script src="/conversejs/dist/converse.min.js"></script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#conversejs .chat-head {
|
#conversejs .chat-head {
|
||||||
display: none;
|
display: none;
|
||||||
@ -22,7 +22,7 @@
|
|||||||
var room = roomParam && /^[\w-]+$/.test(roomParam) ? 'public_' + roomParam : 'public';
|
var room = roomParam && /^[\w-]+$/.test(roomParam) ? 'public_' + roomParam : 'public';
|
||||||
|
|
||||||
converse.initialize({
|
converse.initialize({
|
||||||
assets_path: '/conversejs/7.0.3/',
|
assets_path: '/conversejs/dist/',
|
||||||
|
|
||||||
authentication: 'anonymous',
|
authentication: 'anonymous',
|
||||||
auto_login: true,
|
auto_login: true,
|
||||||
@ -30,6 +30,7 @@
|
|||||||
room + '@room.peertube.im.your_domain',
|
room + '@room.peertube.im.your_domain',
|
||||||
],
|
],
|
||||||
bosh_service_url: 'https://peertube.im.your_domain/http-bind/',
|
bosh_service_url: 'https://peertube.im.your_domain/http-bind/',
|
||||||
|
websocket_url: 'wss://peertube.im.your_domain/xmpp-websocket',
|
||||||
jid: 'peertube.im.your_domain',
|
jid: 'peertube.im.your_domain',
|
||||||
notify_all_room_messages: [
|
notify_all_room_messages: [
|
||||||
room + '@room.peertube.im.your_domain',
|
room + '@room.peertube.im.your_domain',
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
cross_domain_bosh = false;
|
cross_domain_bosh = false;
|
||||||
consider_bosh_secure = true;
|
consider_bosh_secure = true;
|
||||||
|
consider_websocket_secure = true;
|
||||||
|
cross_domain_websocket = true;
|
||||||
|
|
||||||
VirtualHost "peertube.im.your_domain"
|
VirtualHost "peertube.im.your_domain"
|
||||||
authentication = "anonymous"
|
authentication = "anonymous"
|
||||||
@ -12,7 +14,10 @@ VirtualHost "peertube.im.your_domain"
|
|||||||
"http";
|
"http";
|
||||||
"bosh";
|
"bosh";
|
||||||
"ping";
|
"ping";
|
||||||
|
"websocket";
|
||||||
}
|
}
|
||||||
|
http_host = "peertube.im.your_domain"
|
||||||
|
http_external_url = "http://peertube.im.your_domain"
|
||||||
admins = { "admin@im.your_domain" }
|
admins = { "admin@im.your_domain" }
|
||||||
|
|
||||||
Component "room.peertube.im.your_domain" "muc"
|
Component "room.peertube.im.your_domain" "muc"
|
||||||
|
9
package-lock.json
generated
9
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-livechat",
|
"name": "peertube-plugin-livechat",
|
||||||
"version": "0.0.9",
|
"version": "1.0.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -996,9 +996,10 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"converse.js": {
|
"converse.js": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/converse.js/-/converse.js-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/converse.js/-/converse.js-7.0.4.tgz",
|
||||||
"integrity": "sha512-dCOm/FvW9kGTOgnTiyuL8oSr8/yQCCYNltQpgX+7S0HRqY+Pi9Gt+O9fkTe5kalIA02TlEfCxuCOvwblbzcjwA=="
|
"integrity": "sha512-U07RJB71nG88IRlfhlcxOlJAnH4pVNH1H8jF39OANxZbqSikOX3qJO3e3fV0Tem0I9oNgDqkRW60pI22zjeP0w==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"copy-concurrently": {
|
"copy-concurrently": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
|
@ -21,11 +21,10 @@
|
|||||||
"css": [
|
"css": [
|
||||||
"assets/style.css"
|
"assets/style.css"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {},
|
||||||
"converse.js": "7.0.3"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@purtuga/esm-webpack-plugin": "^1.1.1",
|
"@purtuga/esm-webpack-plugin": "^1.1.1",
|
||||||
|
"converse.js": "^7.0.4",
|
||||||
"eslint": "^7.20.0",
|
"eslint": "^7.20.0",
|
||||||
"eslint-config-standard": "^16.0.2",
|
"eslint-config-standard": "^16.0.2",
|
||||||
"eslint-plugin-import": "^2.22.1",
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user