1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-04 05:02:41 +03:00

Fix issues with /search and /context API handling for threads (#2261)

This commit is contained in:
Michael Telatynski
2022-03-29 09:24:45 +01:00
committed by GitHub
parent bdc3da1fac
commit 85b8d4f83a
8 changed files with 371 additions and 120 deletions

View File

@@ -165,12 +165,12 @@ export class Thread extends TypedEventEmitter<EmittedEvents, EventHandlerMap> {
this.addEventToTimeline(event, toStartOfTimeline);
await this.client.decryptEventIfNeeded(event, {});
} else {
} else if (!toStartOfTimeline &&
this.initialEventsFetched &&
event.localTimestamp > this.lastReply().localTimestamp
) {
await this.fetchEditsWhereNeeded(event);
if (this.initialEventsFetched && event.localTimestamp > this.lastReply().localTimestamp) {
this.addEventToTimeline(event, false);
}
this.addEventToTimeline(event, false);
}
if (!this._currentUserParticipated && event.getSender() === this.client.getUserId()) {