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
993c8f16
Commit
993c8f16
authored
Dec 07, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We need to send out a separate IQ stanza for each affiliation
At least for Prosody.
parent
54371f0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
src/converse-muc.js
src/converse-muc.js
+18
-11
No files found.
src/converse-muc.js
View file @
993c8f16
...
...
@@ -605,19 +605,26 @@
onSuccess
(
null
);
return
;
}
var
iq
=
$iq
({
to
:
this
.
model
.
get
(
'
jid
'
),
type
:
"
set
"
})
.
c
(
"
query
"
,
{
xmlns
:
Strophe
.
NS
.
MUC_ADMIN
});
_
.
each
(
members
,
function
(
member
)
{
iq
.
c
(
"
item
"
,
{
'
affiliation
'
:
member
.
affiliation
,
'
jid
'
:
member
.
jid
var
room_jid
=
this
.
model
.
get
(
'
jid
'
);
var
affiliations
=
_
.
uniq
(
_
.
pluck
(
members
,
'
affiliation
'
));
_
.
each
(
affiliations
,
function
(
affiliation
)
{
var
iq
=
$iq
({
to
:
room_jid
,
type
:
"
set
"
})
.
c
(
"
query
"
,
{
xmlns
:
Strophe
.
NS
.
MUC_ADMIN
});
_
.
each
(
members
,
function
(
member
)
{
if
(
member
.
affiliation
!==
affiliation
)
{
return
;
}
iq
.
c
(
"
item
"
,
{
'
affiliation
'
:
member
.
affiliation
,
'
jid
'
:
member
.
jid
});
if
(
!
_
.
isUndefined
(
member
.
reason
))
{
iq
.
c
(
"
reason
"
,
member
.
reason
).
up
();
}
iq
.
up
();
});
if
(
!
_
.
isUndefined
(
member
.
reason
))
{
iq
.
c
(
"
reason
"
,
member
.
reason
).
up
();
}
iq
.
up
();
converse
.
connection
.
sendIQ
(
iq
,
onSuccess
,
onError
);
});
return
converse
.
connection
.
sendIQ
(
iq
,
onSuccess
,
onError
);
},
marshallAffiliationIQs
:
function
()
{
...
...
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