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
f68712a5
Commit
f68712a5
authored
Oct 08, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Presence stanza sent out before roster initialized
parent
90be11ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
CHANGES.rst
CHANGES.rst
+5
-0
converse.js
converse.js
+12
-14
No files found.
CHANGES.rst
View file @
f68712a5
Changelog
Changelog
=========
=========
0.6.6 (2013-10-08)
------------------
* Bugfix: Presence stanza sent out before roster has been initialized [jcbrand]
0.6.5 (2013-10-08)
0.6.5 (2013-10-08)
------------------
------------------
...
...
converse.js
View file @
f68712a5
...
@@ -2190,6 +2190,17 @@
...
@@ -2190,6 +2190,17 @@
},
},
rosterHandler
:
function
(
items
)
{
rosterHandler
:
function
(
items
)
{
if
((
items
.
length
===
0
)
||
(
items
.
length
===
_
.
where
(
items
,
{
subscription
:
'
none
'
}).
length
))
{
// The presence stanza is sent out once all
// roster contacts have been added and rendered.
// See RosterView's render method.
//
// If there aren't any roster contacts, we still
// want to send a presence stanza, so we do it here.
converse
.
xmppstatus
.
sendPresence
();
return
true
;
}
this
.
cleanCache
(
items
);
this
.
cleanCache
(
items
);
_
.
each
(
items
,
function
(
item
,
index
,
items
)
{
_
.
each
(
items
,
function
(
item
,
index
,
items
)
{
if
(
this
.
isSelf
(
item
.
jid
))
{
return
;
}
if
(
this
.
isSelf
(
item
.
jid
))
{
return
;
}
...
@@ -2359,20 +2370,7 @@
...
@@ -2359,20 +2370,7 @@
}
}
this
.
$el
.
hide
().
html
(
roster_markup
);
this
.
$el
.
hide
().
html
(
roster_markup
);
this
.
model
.
fetch
({
this
.
model
.
fetch
({
add
:
true
});
// Get the cached roster items from localstorage
add
:
true
,
success
:
function
(
model
,
resp
,
options
)
{
if
(
resp
.
length
===
0
)
{
// The presence stanza is sent out once all
// roster contacts have been added and rendered.
// See RosterView's render method.
//
// If there aren't any roster contacts, we still
// want to send a presence stanza, so we do it here.
converse
.
xmppstatus
.
sendPresence
();
}
}
});
// Get the cached roster items from localstorage
},
},
updateChatBox
:
function
(
item
,
changed
)
{
updateChatBox
:
function
(
item
,
changed
)
{
...
...
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