-
-
Notifications
You must be signed in to change notification settings - Fork 672
Fix getLatestTimeline not working when the latest event in the room is a threaded message
#2521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
MadLittleMods
wants to merge
12
commits into
develop
from
madlittlemods/refresh-timeline-when-we-see-msc2716-marker-events-v2
Closed
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5f4d10d
Fix getLatestTimeline not working when the latest even in the room wa…
MadLittleMods e8dc590
Adjust tests to not include problem events instead of undefined timeline
MadLittleMods 9882eb6
Add tests for not being able to add mixed events
MadLittleMods fdeb9e0
Correct JSDoc and types for getEventTimeline
MadLittleMods 78f8019
No longer need check since it should always return a timeline
MadLittleMods 50b5bb1
Add getLatestTimeline test for latest event being thread
MadLittleMods a3457e1
Add non-optional client to Room instances
MadLittleMods cdef5cb
Fix lint
MadLittleMods cd41d7e
We expect void so return void
MadLittleMods a3ea213
Merge branch 'develop' into madlittlemods/refresh-timeline-when-we-se…
MadLittleMods b97de19
Merge branch 'develop' into madlittlemods/refresh-timeline-when-we-se…
MadLittleMods f82ea0c
Fix some lints
MadLittleMods File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add getLatestTimeline test for latest event being thread
- Loading branch information
commit 50b5bb1d031ceb2df26d23291bfdd5b644f4e752
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -699,7 +699,8 @@ export class EventTimelineSet extends TypedEventEmitter<EmittedEvents, EventTime | |
| // Make sure events don't get mixed in timelines they shouldn't be in | ||
| // (e.g. a threaded message should not be in the main timeline). | ||
| if (!this.canContain(event)) { | ||
| logger.warn(`EventTimelineSet.addEventToTimeline: Ignoring event=${event.getId()} that does not belong in timeline=${timeline.toString()} timelineSet(threadId=${this.thread?.id})`); | ||
| logger.warn(`EventTimelineSet.addEventToTimeline: Ignoring event=${event.getId()} that does not belong " + | ||
| "in timeline=${timeline.toString()} timelineSet(threadId=${this.thread?.id})`); | ||
| return; | ||
| } | ||
|
Comment on lines
+698
to
+709
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Split out to #2848 |
||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?? timelineSet.room.findThreadForEvent(event)?.liveTimeline // for Threads degraded supportwas added in #2261. Is it necessary? I'm just trying to get the context behind why we have it.What does
Threads degraded supportexactly map to?If
supportsExperimentalThreadsis disabled all events will be added to the main timeline (eventShouldLiveInalways returnsshouldLiveInRoom: true)Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Server has no APIs to help the client so the client has to build the threads objects without filters & relations support on the server based on /sync and /messages data alone, which is a mode we have to continue to support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the context!
I think it's safe to drop this case given
getTimelineForEventis always used in a fire and forget manner, see #2521 (comment)