Websocket support. closes #204
This commit is contained in:
parent
95bc55c1c3
commit
3e9994e01c
14
converse.js
14
converse.js
@ -280,6 +280,7 @@
|
|||||||
'clear': true,
|
'clear': true,
|
||||||
'toggle_participants': true
|
'toggle_participants': true
|
||||||
},
|
},
|
||||||
|
websocket_url: undefined,
|
||||||
xhr_custom_status: false,
|
xhr_custom_status: false,
|
||||||
xhr_custom_status_url: '',
|
xhr_custom_status_url: '',
|
||||||
xhr_user_search: false,
|
xhr_user_search: false,
|
||||||
@ -664,11 +665,6 @@
|
|||||||
// object should never be exposed to production systems.
|
// object should never be exposed to production systems.
|
||||||
// 'jasmine tests' is an invalid http bind service value,
|
// 'jasmine tests' is an invalid http bind service value,
|
||||||
// so we're sure that this is just for tests.
|
// so we're sure that this is just for tests.
|
||||||
//
|
|
||||||
// TODO: We might need to consider websockets, which
|
|
||||||
// probably won't use the 'service' attr. Current
|
|
||||||
// strophe.js version used by converse.js doesn't support
|
|
||||||
// websockets.
|
|
||||||
this.callback(this);
|
this.callback(this);
|
||||||
} else {
|
} else {
|
||||||
this.callback();
|
this.callback();
|
||||||
@ -5101,10 +5097,14 @@
|
|||||||
//
|
//
|
||||||
// Also, what do we do when the keepalive session values are
|
// Also, what do we do when the keepalive session values are
|
||||||
// expired? Do we try to fall back?
|
// expired? Do we try to fall back?
|
||||||
if (!this.bosh_service_url) {
|
if (!this.bosh_service_url && ! this.websocket_url) {
|
||||||
throw("Error: you must supply a value for the bosh_service_url");
|
throw("Error: you must supply a value for the bosh_service_url or websocket_url");
|
||||||
}
|
}
|
||||||
|
if ('WebSocket' in window || 'MozWebSocket' in window) {
|
||||||
|
this.connection = new Strophe.Connection(this.websocket_url);
|
||||||
|
} else {
|
||||||
this.connection = new Strophe.Connection(this.bosh_service_url);
|
this.connection = new Strophe.Connection(this.bosh_service_url);
|
||||||
|
}
|
||||||
this.setUpXMLLogging();
|
this.setUpXMLLogging();
|
||||||
|
|
||||||
if (this.prebind) {
|
if (this.prebind) {
|
||||||
|
@ -8,6 +8,7 @@ Changelog
|
|||||||
* Updated Afrikaans translations. [jcbrand]
|
* Updated Afrikaans translations. [jcbrand]
|
||||||
* Add responsiveness to CSS. We now use Sass preprocessor for generating CSS. [jcbrand]
|
* Add responsiveness to CSS. We now use Sass preprocessor for generating CSS. [jcbrand]
|
||||||
* Don't send out the message carbons IQ stanza on each page load. [jcbrand]
|
* Don't send out the message carbons IQ stanza on each page load. [jcbrand]
|
||||||
|
* #204 Support websocket connections. [jcbrand]
|
||||||
* #252, 253 Add fullname and jid to contact's tooltip in roster. [gbonvehi]
|
* #252, 253 Add fullname and jid to contact's tooltip in roster. [gbonvehi]
|
||||||
* #292 Better support for XEP-0085 Chat State Notifications. [jcbrand]
|
* #292 Better support for XEP-0085 Chat State Notifications. [jcbrand]
|
||||||
* #295 Document "allow_registration". [gbonvehi]
|
* #295 Document "allow_registration". [gbonvehi]
|
||||||
|
Loading…
Reference in New Issue
Block a user