Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
elm
element-web
matrix-js-sdk
Commits
a77f315e
Unverified
Commit
a77f315e
authored
2 years ago
by
Till Faelligen
Browse files
Options
Download
Email Patches
Plain Diff
Fix duplicate rooms by re-sending modified lists
parent
3564a354
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
src/sliding-sync.ts
src/sliding-sync.ts
+10
-4
No files found.
src/sliding-sync.ts
View file @
a77f315e
...
...
@@ -861,10 +861,16 @@ export class SlidingSync extends TypedEventEmitter<SlidingSyncEvent, SlidingSync
logger
.
debug
(
"
list modified during await call, not updating list
"
);
doNotUpdateList
=
true
;
}
// mark all these lists as having been sent as sticky so we don't keep sending sticky params
this
.
lists
.
forEach
((
l
)
=>
{
l
.
setModified
(
false
);
});
// Only mark the lists as sticky if our lists weren't modified during the call.
// This will result in us sending the lists again, but ensures they are correct.
if
(
!
doNotUpdateList
)
{
// mark all these lists as having been sent as sticky so we don't keep sending sticky params
this
.
lists
.
forEach
((
l
)
=>
{
l
.
setModified
(
false
);
});
}
// set default empty values so we don't need to null check
resp
.
lists
=
resp
.
lists
||
[];
resp
.
rooms
=
resp
.
rooms
||
{};
...
...
This diff is collapsed.
Click to expand it.
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