Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
7c7002eb
Commit
7c7002eb
authored
May 30, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `_converse.default_connection_options`
So that we can specify defaults
parent
eafe995f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/headless/converse-core.js
src/headless/converse-core.js
+6
-2
No files found.
src/headless/converse-core.js
View file @
7c7002eb
...
@@ -190,6 +190,7 @@ _converse.CHATROOMS_TYPE = 'chatroom';
...
@@ -190,6 +190,7 @@ _converse.CHATROOMS_TYPE = 'chatroom';
_converse
.
HEADLINES_TYPE
=
'
headline
'
;
_converse
.
HEADLINES_TYPE
=
'
headline
'
;
_converse
.
CONTROLBOX_TYPE
=
'
controlbox
'
;
_converse
.
CONTROLBOX_TYPE
=
'
controlbox
'
;
_converse
.
default_connection_options
=
{};
// Default configuration values
// Default configuration values
// ----------------------------
// ----------------------------
...
@@ -412,11 +413,14 @@ _converse.initConnection = function () {
...
@@ -412,11 +413,14 @@ _converse.initConnection = function () {
throw
new
Error
(
"
initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.
"
);
throw
new
Error
(
"
initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.
"
);
}
}
if
((
'
WebSocket
'
in
window
||
'
MozWebSocket
'
in
window
)
&&
_converse
.
websocket_url
)
{
if
((
'
WebSocket
'
in
window
||
'
MozWebSocket
'
in
window
)
&&
_converse
.
websocket_url
)
{
_converse
.
connection
=
new
Strophe
.
Connection
(
_converse
.
websocket_url
,
_converse
.
connection_options
);
_converse
.
connection
=
new
Strophe
.
Connection
(
_converse
.
websocket_url
,
Object
.
assign
(
_converse
.
default_connection_options
,
_converse
.
connection_options
)
);
}
else
if
(
_converse
.
bosh_service_url
)
{
}
else
if
(
_converse
.
bosh_service_url
)
{
_converse
.
connection
=
new
Strophe
.
Connection
(
_converse
.
connection
=
new
Strophe
.
Connection
(
_converse
.
bosh_service_url
,
_converse
.
bosh_service_url
,
_
.
assignIn
(
_converse
.
connection_options
,
{
'
keepalive
'
:
_converse
.
keepalive
})
Object
.
assign
(
_converse
.
default_connection_options
,
_converse
.
connection_options
,
{
'
keepalive
'
:
_converse
.
keepalive
})
);
);
}
else
{
}
else
{
throw
new
Error
(
"
initConnection: this browser does not support websockets and bosh_service_url wasn't specified.
"
);
throw
new
Error
(
"
initConnection: this browser does not support websockets and bosh_service_url wasn't specified.
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment