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
aa30e4d9
Commit
aa30e4d9
authored
Jul 29, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Don't unnecessarily fetch roster again when it's empty
parent
e20b6548
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
src/headless/converse-roster.js
src/headless/converse-roster.js
+4
-5
No files found.
src/headless/converse-roster.js
View file @
aa30e4d9
...
...
@@ -469,11 +469,7 @@ converse.plugins.add('converse-roster', {
}
catch
(
e
)
{
return
_converse
.
log
(
e
,
Strophe
.
LogLevel
.
ERROR
);
}
if
(
collection
.
length
===
0
||
(
this
.
rosterVersioningSupported
()
&&
!
_converse
.
session
.
get
(
'
roster_fetched
'
)))
{
_converse
.
send_initial_presence
=
true
;
return
_converse
.
roster
.
fetchFromServer
();
}
else
{
if
(
collection
.
length
||
(
this
.
rosterVersioningSupported
()
&&
_converse
.
session
.
get
(
'
roster_fetched
'
)))
{
/**
* The contacts roster has been retrieved from the local cache (`sessionStorage`).
* @event _converse#cachedRoster
...
...
@@ -482,6 +478,9 @@ converse.plugins.add('converse-roster', {
* @example _converse.api.waitUntil('cachedRoster').then(items => { ... });
*/
_converse
.
api
.
trigger
(
'
cachedRoster
'
,
collection
);
}
else
{
_converse
.
send_initial_presence
=
true
;
return
_converse
.
roster
.
fetchFromServer
();
}
},
...
...
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