Skip to content

Commit c080c6c

Browse files
committed
Remove fixme in favor of aspirational explanation of what we could do better
1 parent 701bf34 commit c080c6c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/sync.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,20 +305,16 @@ export class SyncApi {
305305
// Saw new marker event, let's let the clients know they should
306306
// refresh the timeline.
307307
//
308-
// FIXME: Is there a way we could lookup
309-
// `markerEvent.getContent()['m.insertion_id']` and get the
310-
// prev_events of that event to see exactly where the history
311-
// was imported and whether we have it locally? Because we only
308+
// It would be nice if we could lookup the base insertion event
309+
// that the marker event was pointing to because we really only
312310
// need to refresh the timeline if the timeline includes the
313-
// prev_events of the base insertion event.
314-
const originalStackTraceLimit = Error.stackTraceLimit;
315-
Error.stackTraceLimit = Infinity;
311+
// prev_events of the base insertion event and won't re-request
312+
// `/messages` over that range in the timeline. But the problem
313+
// is we can't see prev_events from the client API.
316314
logger.debug(
317315
`MarkerState: Timeline needs to be refreshed because ` +
318316
`a new markerEventId=${markerEvent.getId()} was sent in roomId=${room.roomId}`,
319-
new Error().stack,
320317
);
321-
Error.stackTraceLimit = originalStackTraceLimit;
322318
room.setTimelineNeedsRefresh(true);
323319
room.emit(RoomEvent.historyImportedWithinTimeline, markerEvent, room);
324320
room.setLastMarkerEventIdProcessed(markerEvent.getId());

0 commit comments

Comments
 (0)