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
aa509424
Commit
aa509424
authored
Oct 11, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show join message for non-online occupants created from members list
Fixes #1169
parent
8c772a7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
CHANGES.md
CHANGES.md
+1
-0
dist/converse.js
dist/converse.js
+8
-2
src/converse-muc-views.js
src/converse-muc-views.js
+7
-1
No files found.
CHANGES.md
View file @
aa509424
...
...
@@ -6,6 +6,7 @@
-
Bugfix. MUC features weren't being refreshed when saving the config form
-
#1063 URLs in the topic / subject are not clickable
-
#1140 Add support for destroyed chatrooms
-
#1169 Non-joined participants display an unwanted status message
-
#1190 MUC Participants column disappears in certain viewport widths
-
#1199 Can't get back from to login screen from registration screen
-
#1204 Link encoding issue
...
...
dist/converse.js
View file @
aa509424
...
...
@@ -68681,7 +68681,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.model.on('configurationNeeded', this.getAndRenderConfigurationForm, this);
this.model.on('destroy', this.hide, this);
this.model.on('show', this.show, this);
this.model.occupants.on('add', this.
showJoinNotification
, this);
this.model.occupants.on('add', this.
onOccupantAdded
, this);
this.model.occupants.on('remove', this.showLeaveNotification, this);
this.model.occupants.on('change:show', this.showJoinOrLeaveNotification, this);
this.model.occupants.on('change:role', this.informOfOccupantsRoleChange, this);
...
...
@@ -69700,8 +69700,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}
},
onOccupantAdded(occupant) {
if (occupant.get('show') === 'online') {
this.showJoinNotification(occupant);
}
},
showJoinOrLeaveNotification(occupant) {
if (
!occupant.isMember() ||
_.includes(occupant.get('states'), '303')) {
if (_.includes(occupant.get('states'), '303')) {
return;
}
src/converse-muc-views.js
View file @
aa509424
...
...
@@ -540,7 +540,7 @@
this
.
model
.
on
(
'
destroy
'
,
this
.
hide
,
this
);
this
.
model
.
on
(
'
show
'
,
this
.
show
,
this
);
this
.
model
.
occupants
.
on
(
'
add
'
,
this
.
showJoinNotification
,
this
);
this
.
model
.
occupants
.
on
(
'
add
'
,
this
.
onOccupantAdded
,
this
);
this
.
model
.
occupants
.
on
(
'
remove
'
,
this
.
showLeaveNotification
,
this
);
this
.
model
.
occupants
.
on
(
'
change:show
'
,
this
.
showJoinOrLeaveNotification
,
this
);
this
.
model
.
occupants
.
on
(
'
change:role
'
,
this
.
informOfOccupantsRoleChange
,
this
);
...
...
@@ -1476,6 +1476,12 @@
}
},
onOccupantAdded
(
occupant
)
{
if
(
occupant
.
get
(
'
show
'
)
===
'
online
'
)
{
this
.
showJoinNotification
(
occupant
);
}
},
showJoinOrLeaveNotification
(
occupant
)
{
if
(
_
.
includes
(
occupant
.
get
(
'
states
'
),
'
303
'
))
{
return
;
...
...
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