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
8998a057
Commit
8998a057
authored
Oct 27, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that subscribeToRosterSuggestions is ...
called sequentially with enough time between each call.
parent
d03a9a01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
converse.js
converse.js
+16
-7
No files found.
converse.js
View file @
8998a057
...
...
@@ -1935,7 +1935,7 @@
b64_sha1
(
'
converse.roster.groups
'
+
converse
.
bare_jid
));
converse
.
rosterview
=
new
converse
.
RosterView
({
model
:
rostergroups
});
this
.
contactspanel
.
$el
.
append
(
converse
.
rosterview
.
$el
);
// TODO:
// TODO:
// See if we shouldn't also fetch the roster here... otherwise
// the roster is always populated by the rosterHandler method,
// which appears to be a less economic way.
...
...
@@ -3379,15 +3379,13 @@
},
subscribeToSuggestedItems
:
function
(
msg
)
{
$
(
msg
).
find
(
'
item
'
).
each
(
function
()
{
$
(
msg
).
find
(
'
item
'
).
each
(
function
(
i
,
items
)
{
var
$this
=
$
(
this
),
jid
=
$this
.
attr
(
'
jid
'
),
action
=
$this
.
attr
(
'
action
'
),
fullname
=
$this
.
attr
(
'
name
'
);
if
(
action
===
'
add
'
)
{
converse
.
connection
.
roster
.
add
(
jid
,
fullname
,
[],
function
(
iq
)
{
converse
.
connection
.
roster
.
subscribe
(
jid
,
null
,
converse
.
xmppstatus
.
get
(
'
fullname
'
));
});
converse
.
connection
.
roster
.
subscribe
(
jid
,
null
,
converse
.
xmppstatus
.
get
(
'
fullname
'
));
}
});
return
true
;
...
...
@@ -3725,7 +3723,7 @@
show
:
function
()
{
// FIXME: There's a bug here, if show_only_online_users is true
// Possible solution, get the group, call _.each and check
// showInRoster
// showInRoster
this
.
$el
.
nextUntil
(
'
dt
'
).
addBack
().
show
();
},
...
...
@@ -3988,8 +3986,19 @@
},
registerRosterXHandler
:
function
()
{
var
t
=
0
;
converse
.
connection
.
addHandler
(
$
.
proxy
(
converse
.
roster
.
subscribeToSuggestedItems
,
converse
.
roster
),
function
(
msg
)
{
window
.
setTimeout
(
function
()
{
converse
.
connection
.
flush
();
$
.
proxy
(
converse
.
roster
.
subscribeToSuggestedItems
,
converse
.
roster
)(
msg
);
},
t
);
t
+=
$
(
msg
).
find
(
'
item
'
).
length
*
250
;
return
true
;
},
'
http://jabber.org/protocol/rosterx
'
,
'
message
'
,
null
);
},
...
...
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