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 1 commit
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
6 changes: 4 additions & 2 deletions src/indexing/EventIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,10 @@ 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 | null,
germain-gg marked this conversation as resolved.
Show resolved Hide resolved
) => {
if (!room) return;
if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) return;

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