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
f5b10ff6
Commit
f5b10ff6
authored
Sep 12, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting
parent
71370f5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
37 deletions
+35
-37
src/converse-muc-views.js
src/converse-muc-views.js
+35
-37
No files found.
src/converse-muc-views.js
View file @
f5b10ff6
...
@@ -887,26 +887,25 @@
...
@@ -887,26 +887,25 @@
if
(
!
this
.
verifyAffiliations
([
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
if
(
!
this
.
verifyAffiliations
([
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
break
;
break
;
}
}
this
.
model
.
setAffiliation
(
'
admin
'
,
this
.
model
.
setAffiliation
(
'
admin
'
,
[{
[{
'
jid
'
:
args
[
0
],
'
jid
'
:
args
[
0
],
'
reason
'
:
args
[
1
]
'
reason
'
:
args
[
1
]
}]).
then
(
}]).
then
(
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
(
err
)
=>
this
.
onCommandError
(
err
)
(
err
)
=>
this
.
onCommandError
(
err
)
);
);
break
;
break
;
case
'
ban
'
:
case
'
ban
'
:
if
(
!
this
.
verifyAffiliations
([
'
owner
'
,
'
admin
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
if
(
!
this
.
verifyAffiliations
([
'
owner
'
,
'
admin
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
break
;
break
;
}
}
this
.
model
.
setAffiliation
(
'
outcast
'
,
[{
this
.
model
.
setAffiliation
(
'
outcast
'
,
'
jid
'
:
args
[
0
],
[{
'
jid
'
:
args
[
0
],
'
reason
'
:
args
[
1
]
'
reason
'
:
args
[
1
]
}]).
then
(
}]).
then
(
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
(
err
)
=>
this
.
onCommandError
(
err
)
(
err
)
=>
this
.
onCommandError
(
err
)
);
);
break
;
break
;
case
'
deop
'
:
case
'
deop
'
:
if
(
!
this
.
verifyAffiliations
([
'
admin
'
,
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
if
(
!
this
.
verifyAffiliations
([
'
admin
'
,
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
...
@@ -959,14 +958,13 @@
...
@@ -959,14 +958,13 @@
}
}
const
occupant
=
this
.
model
.
occupants
.
findWhere
({
'
nick
'
:
args
[
0
]})
||
const
occupant
=
this
.
model
.
occupants
.
findWhere
({
'
nick
'
:
args
[
0
]})
||
this
.
model
.
occupants
.
findWhere
({
'
jid
'
:
args
[
0
]});
this
.
model
.
occupants
.
findWhere
({
'
jid
'
:
args
[
0
]});
this
.
model
.
setAffiliation
(
'
member
'
,
[{
this
.
model
.
setAffiliation
(
'
member
'
,
'
jid
'
:
occupant
.
get
(
'
jid
'
),
[{
'
jid
'
:
occupant
.
get
(
'
jid
'
),
'
reason
'
:
args
[
1
]
'
reason
'
:
args
[
1
]
}]).
then
(
}]).
then
(
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
(
err
)
=>
this
.
onCommandError
(
err
)
(
err
)
=>
this
.
onCommandError
(
err
)
);
);
break
;
break
;
}
case
'
nick
'
:
}
case
'
nick
'
:
if
(
!
this
.
verifyRoles
([
'
visitor
'
,
'
participant
'
,
'
moderator
'
]))
{
if
(
!
this
.
verifyRoles
([
'
visitor
'
,
'
participant
'
,
'
moderator
'
]))
{
...
@@ -982,13 +980,13 @@
...
@@ -982,13 +980,13 @@
if
(
!
this
.
verifyAffiliations
([
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
if
(
!
this
.
verifyAffiliations
([
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
break
;
break
;
}
}
this
.
model
.
setAffiliation
(
'
owner
'
,
this
.
model
.
setAffiliation
(
'
owner
'
,
[{
[{
'
jid
'
:
args
[
0
],
'
jid
'
:
args
[
0
],
'
reason
'
:
args
[
1
]
'
reason
'
:
args
[
1
]
}]).
then
(
}]).
then
(
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
(
err
)
=>
this
.
onCommandError
(
err
)
(
err
)
=>
this
.
onCommandError
(
err
)
);
);
break
;
break
;
case
'
op
'
:
case
'
op
'
:
if
(
!
this
.
verifyAffiliations
([
'
admin
'
,
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
if
(
!
this
.
verifyAffiliations
([
'
admin
'
,
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
...
@@ -1009,13 +1007,13 @@
...
@@ -1009,13 +1007,13 @@
if
(
!
this
.
verifyAffiliations
([
'
admin
'
,
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
if
(
!
this
.
verifyAffiliations
([
'
admin
'
,
'
owner
'
])
||
!
this
.
validateRoleChangeCommand
(
command
,
args
))
{
break
;
break
;
}
}
this
.
model
.
setAffiliation
(
'
none
'
,
this
.
model
.
setAffiliation
(
'
none
'
,
[{
[{
'
jid
'
:
args
[
0
],
'
jid
'
:
args
[
0
],
'
reason
'
:
args
[
1
]
'
reason
'
:
args
[
1
]
}]).
then
(
}]).
then
(
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
()
=>
this
.
model
.
occupants
.
fetchMembers
(),
(
err
)
=>
this
.
onCommandError
(
err
)
(
err
)
=>
this
.
onCommandError
(
err
)
);
);
break
;
break
;
case
'
topic
'
:
case
'
topic
'
:
case
'
subject
'
:
case
'
subject
'
:
...
...
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