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
d53caf11
Commit
d53caf11
authored
Oct 15, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure presence stanza is sent out after roster update
specifically also when localstorage is populated
parent
f68712a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
CHANGES.rst
CHANGES.rst
+1
-1
converse.js
converse.js
+12
-12
No files found.
CHANGES.rst
View file @
d53caf11
...
...
@@ -4,7 +4,7 @@ Changelog
0.6.6 (2013-10-08)
------------------
* Bugfix: Presence stanza
sent out before
roster has been initialized [jcbrand]
* Bugfix: Presence stanza
must be sent out only after
roster has been initialized [jcbrand]
0.6.5 (2013-10-08)
------------------
...
...
converse.js
View file @
d53caf11
...
...
@@ -127,6 +127,7 @@
// Module-level variables
// ----------------------
this
.
callback
=
callback
||
function
()
{};
this
.
initial_presence_sent
=
0
;
this
.
msg_counter
=
0
;
// Module-level functions
...
...
@@ -2190,17 +2191,6 @@
},
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
);
_
.
each
(
items
,
function
(
item
,
index
,
items
)
{
if
(
this
.
isSelf
(
item
.
jid
))
{
return
;
}
...
...
@@ -2227,6 +2217,17 @@
}
}
},
this
);
if
(
!
converse
.
initial_presence_sent
)
{
/* Once we've sent out our initial presence stanza, we'll
* start receiving presence stanzas from our contacts.
* We therefore only want to do this after our roster has
* been set up (otherwise we can't meaningfully process
* incoming presence stanzas).
*/
converse
.
initial_presence_sent
=
1
;
converse
.
xmppstatus
.
sendPresence
();
}
},
handleIncomingSubscription
:
function
(
jid
)
{
...
...
@@ -2454,7 +2455,6 @@
// can show the roster.
this
.
$el
.
show
();
}
converse
.
xmppstatus
.
sendPresence
();
}
}
// Hide the headings if there are no contacts under them
...
...
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