Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix TimelineReset handling when no room associated #9553

Merged
merged 2 commits into from
Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/indexing/EventIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ export default class EventIndex extends EventEmitter {
* Listens for timeline resets that are caused by a limited timeline to
* re-add checkpoints for rooms that need to be crawled again.
*/
private onTimelineReset = async (room: Room, timelineSet: EventTimelineSet, resetAllTimelines: boolean) => {
if (room === null) return;
private onTimelineReset = async (room: Room | undefined) => {
if (!room) return;
if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) return;

logger.log("EventIndex: Adding a checkpoint because of a limited timeline",
Expand Down