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
b1282864
Commit
b1282864
authored
Jun 04, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't disconnect MUC on unload when using SMACKS
updates #1111
parent
48adc047
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/headless/converse-muc.js
src/headless/converse-muc.js
+6
-5
No files found.
src/headless/converse-muc.js
View file @
b1282864
...
...
@@ -1720,14 +1720,15 @@ converse.plugins.add('converse-muc', {
.
filter
(
m
=>
(
m
.
get
(
'
type
'
)
===
_converse
.
CHATROOMS_TYPE
))
.
forEach
(
m
=>
m
.
save
(
'
connection_status
'
,
converse
.
ROOMSTATUS
.
DISCONNECTED
))
}
_converse
.
api
.
listen
.
on
(
'
disconnect
ing
'
,
disconnectChatRooms
);
_converse
.
api
.
listen
.
on
(
'
disconnect
ed
'
,
disconnectChatRooms
);
_converse
.
api
.
listen
.
on
(
'
statusInitialized
'
,
()
=>
{
// XXX: For websocket connections, we disconnect from all
// chatrooms when the page reloads. This is a workaround for
// issue #1111 and should be removed once we support XEP-0198
window
.
addEventListener
(
_converse
.
unloadevent
,
()
=>
{
if
(
_converse
.
connection
.
_proto
instanceof
Strophe
.
Websocket
)
{
const
using_websocket
=
_converse
.
connection
.
_proto
instanceof
Strophe
.
Websocket
;
if
(
using_websocket
&&
!
_converse
.
enable_smacks
)
{
// For non-SMACKS websocket connections, we disconnect all
// chatrooms when the page unloads.
// See issue #1111
disconnectChatRooms
();
}
});
...
...
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