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
cb0d8c7d
Commit
cb0d8c7d
authored
May 02, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Found more MUC code that should be in the view module
parent
6f956284
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
18 deletions
+16
-18
src/converse-muc-views.js
src/converse-muc-views.js
+15
-0
src/converse-muc.js
src/converse-muc.js
+1
-18
No files found.
src/converse-muc-views.js
View file @
cb0d8c7d
...
...
@@ -1815,6 +1815,21 @@
fetchAndSetMUCDomain
(
view
);
view
.
model
.
on
(
'
change:connected
'
,
_
.
partial
(
fetchAndSetMUCDomain
,
view
));
});
function
reconnectToChatRooms
()
{
/* Upon a reconnection event from converse, join again
* all the open chat rooms.
*/
_converse
.
chatboxviews
.
each
(
function
(
view
)
{
if
(
view
.
model
.
get
(
'
type
'
)
===
converse
.
CHATROOMS_TYPE
)
{
view
.
model
.
save
(
'
connection_status
'
,
converse
.
ROOMSTATUS
.
DISCONNECTED
);
view
.
model
.
registerHandlers
();
view
.
join
();
view
.
fetchMessages
();
}
});
}
_converse
.
on
(
'
reconnected
'
,
reconnectToChatRooms
);
/************************ END Event Handlers ************************/
}
});
...
...
src/converse-muc.js
View file @
cb0d8c7d
...
...
@@ -9,7 +9,6 @@
"
form-utils
"
,
"
converse-core
"
,
"
emojione
"
,
"
converse-chatview
"
,
"
converse-disco
"
,
"
backbone.overview
"
,
"
backbone.orderedlistview
"
,
...
...
@@ -68,7 +67,7 @@
*
* NB: These plugins need to have already been loaded via require.js.
*/
dependencies
:
[
"
converse-controlbox
"
,
"
converse-chatview
"
],
dependencies
:
[
"
converse-controlbox
"
],
overrides
:
{
// Overrides mentioned here will be picked up by converse.js's
...
...
@@ -1122,21 +1121,6 @@
_converse
.
emit
(
'
roomsAutoJoined
'
);
}
function
reconnectToChatRooms
()
{
/* Upon a reconnection event from converse, join again
* all the open chat rooms.
*/
_converse
.
chatboxviews
.
each
(
function
(
view
)
{
if
(
view
.
model
.
get
(
'
type
'
)
===
converse
.
CHATROOMS_TYPE
)
{
view
.
model
.
save
(
'
connection_status
'
,
converse
.
ROOMSTATUS
.
DISCONNECTED
);
view
.
model
.
registerHandlers
();
view
.
join
();
view
.
fetchMessages
();
}
});
}
function
disconnectChatRooms
()
{
/* When disconnecting, or reconnecting, mark all chat rooms as
* disconnected, so that they will be properly entered again
...
...
@@ -1167,7 +1151,6 @@
}
});
_converse
.
on
(
'
chatBoxesFetched
'
,
autoJoinRooms
);
_converse
.
on
(
'
reconnected
'
,
reconnectToChatRooms
);
_converse
.
on
(
'
reconnecting
'
,
disconnectChatRooms
);
_converse
.
on
(
'
disconnecting
'
,
disconnectChatRooms
);
/************************ END Event Handlers ************************/
...
...
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