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
1269d53e
Commit
1269d53e
authored
May 21, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move `enterRoom` method to the model
parent
4c924a66
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
src/converse-muc-views.js
src/converse-muc-views.js
+0
-13
src/headless/converse-muc.js
src/headless/converse-muc.js
+14
-0
No files found.
src/converse-muc-views.js
View file @
1269d53e
...
@@ -572,19 +572,6 @@ converse.plugins.add('converse-muc-views', {
...
@@ -572,19 +572,6 @@ converse.plugins.add('converse-muc-views', {
this
.
createOccupantsView
();
this
.
createOccupantsView
();
this
.
insertIntoDOM
();
this
.
insertIntoDOM
();
this
.
registerHandlers
();
this
.
registerHandlers
();
this
.
enterRoom
();
},
async
enterRoom
()
{
if
(
this
.
model
.
get
(
'
connection_status
'
)
!==
converse
.
ROOMSTATUS
.
ENTERED
)
{
await
this
.
model
.
getRoomFeatures
();
if
(
!
u
.
isPersistableModel
(
this
.
model
))
{
// XXX: Happens during tests, nothing to do if this
// is a hanging chatbox (i.e. not in the collection anymore).
return
;
}
this
.
model
.
join
();
}
/**
/**
* Triggered once a groupchat has been opened
* Triggered once a groupchat has been opened
* @event _converse#chatRoomOpened
* @event _converse#chatRoomOpened
...
...
src/headless/converse-muc.js
View file @
1269d53e
...
@@ -218,8 +218,22 @@ converse.plugins.add('converse-muc', {
...
@@ -218,8 +218,22 @@ converse.plugins.add('converse-muc', {
this
.
initOccupants
();
this
.
initOccupants
();
this
.
registerHandlers
();
this
.
registerHandlers
();
this
.
initMessages
();
this
.
initMessages
();
this
.
enterRoom
();
},
},
async
enterRoom
()
{
if
(
this
.
get
(
'
connection_status
'
)
!==
converse
.
ROOMSTATUS
.
ENTERED
)
{
await
this
.
getRoomFeatures
();
if
(
!
u
.
isPersistableModel
(
this
))
{
// XXX: Happens during tests, nothing to do if this
// is a hanging chatbox (i.e. not in the collection anymore).
return
;
}
this
.
join
();
}
},
async
onConnectionStatusChanged
()
{
async
onConnectionStatusChanged
()
{
if
(
this
.
get
(
'
connection_status
'
)
===
converse
.
ROOMSTATUS
.
ENTERED
)
{
if
(
this
.
get
(
'
connection_status
'
)
===
converse
.
ROOMSTATUS
.
ENTERED
)
{
this
.
occupants
.
fetchMembers
();
this
.
occupants
.
fetchMembers
();
...
...
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