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
b172861d
Commit
b172861d
authored
Feb 11, 2019
by
laszlovl
Committed by
JC Brand
Feb 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont run fetchRosterContacts async, to prevent processing presence before contacts are created
Fixes #1405
parent
4a5603ab
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
CHANGES.md
CHANGES.md
+1
-0
dist/converse.js
dist/converse.js
+9
-6
src/headless/converse-roster.js
src/headless/converse-roster.js
+9
-5
No files found.
CHANGES.md
View file @
b172861d
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
-
Accessibility: Tag the chat-content as an ARIA live region, for screen readers
-
Accessibility: Tag the chat-content as an ARIA live region, for screen readers
-
Set releases URL to new Github repo
-
Set releases URL to new Github repo
-
#1369 Don't wrongly interpret message with
`subject`
as a topic change.
-
#1369 Don't wrongly interpret message with
`subject`
as a topic change.
-
#1405 Status of contacts list are not displayed properly
-
#1408 new config option
`roomconfig_whitelist`
-
#1408 new config option
`roomconfig_whitelist`
-
#1412 muc moderator commands can be disabled selectively by config
-
#1412 muc moderator commands can be disabled selectively by config
-
#1413 fix moderator commands that change affiliation
-
#1413 fix moderator commands that change affiliation
...
...
dist/converse.js
View file @
b172861d
...
@@ -68022,11 +68022,15 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
...
@@ -68022,11 +68022,15 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
}
}
} else {
} else {
try {
try {
await _converse.rostergroups.fetchRosterGroups().then(() => {
/* Make sure not to run fetchRosterContacts async, since we need
* the contacts to exist before processing contacts presence,
* which might come in the same BOSH request.
*/
await _converse.rostergroups.fetchRosterGroups();
_converse.emit('rosterGroupsFetched');
_converse.emit('rosterGroupsFetched');
return _converse.roster.fetchRosterContacts();
await _converse.roster.fetchRosterContacts();
});
_converse.emit('rosterContactsFetched');
_converse.emit('rosterContactsFetched');
} catch (reason) {
} catch (reason) {
...
@@ -68375,8 +68379,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
...
@@ -68375,8 +68379,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
if (collection.length === 0 || this.rosterVersioningSupported() && !_converse.session.get('roster_fetched')) {
if (collection.length === 0 || this.rosterVersioningSupported() && !_converse.session.get('roster_fetched')) {
_converse.send_initial_presence = true;
_converse.send_initial_presence = true;
await _converse.roster.fetchFromServer();
_converse.roster.fetchFromServer();
} else {
} else {
_converse.emit('cachedRoster', collection);
_converse.emit('cachedRoster', collection);
}
}
src/headless/converse-roster.js
View file @
b172861d
...
@@ -88,10 +88,14 @@ converse.plugins.add('converse-roster', {
...
@@ -88,10 +88,14 @@ converse.plugins.add('converse-roster', {
}
}
}
else
{
}
else
{
try
{
try
{
await
_converse
.
rostergroups
.
fetchRosterGroups
().
then
(()
=>
{
/* Make sure not to run fetchRosterContacts async, since we need
* the contacts to exist before processing contacts presence,
* which might come in the same BOSH request.
*/
await
_converse
.
rostergroups
.
fetchRosterGroups
();
_converse
.
emit
(
'
rosterGroupsFetched
'
);
_converse
.
emit
(
'
rosterGroupsFetched
'
);
return
_converse
.
roster
.
fetchRosterContacts
();
}
);
await
_converse
.
roster
.
fetchRosterContacts
(
);
_converse
.
emit
(
'
rosterContactsFetched
'
);
_converse
.
emit
(
'
rosterContactsFetched
'
);
}
catch
(
reason
)
{
}
catch
(
reason
)
{
_converse
.
log
(
reason
,
Strophe
.
LogLevel
.
ERROR
);
_converse
.
log
(
reason
,
Strophe
.
LogLevel
.
ERROR
);
...
@@ -403,7 +407,7 @@ converse.plugins.add('converse-roster', {
...
@@ -403,7 +407,7 @@ converse.plugins.add('converse-roster', {
if
(
collection
.
length
===
0
||
if
(
collection
.
length
===
0
||
(
this
.
rosterVersioningSupported
()
&&
!
_converse
.
session
.
get
(
'
roster_fetched
'
)))
{
(
this
.
rosterVersioningSupported
()
&&
!
_converse
.
session
.
get
(
'
roster_fetched
'
)))
{
_converse
.
send_initial_presence
=
true
;
_converse
.
send_initial_presence
=
true
;
_converse
.
roster
.
fetchFromServer
();
await
_converse
.
roster
.
fetchFromServer
();
}
else
{
}
else
{
_converse
.
emit
(
'
cachedRoster
'
,
collection
);
_converse
.
emit
(
'
cachedRoster
'
,
collection
);
}
}
...
...
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