diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index f0b496f0b7..9de442a4b9 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -434,7 +434,6 @@ export class StopGapWidgetDriver extends WidgetDriver { } const { - originalEvent, events, nextBatch, prevBatch, @@ -451,7 +450,6 @@ export class StopGapWidgetDriver extends WidgetDriver { }); return { - originalEvent: originalEvent?.getEffectiveEvent(), chunk: events.map(e => e.getEffectiveEvent()), nextBatch, prevBatch, diff --git a/test/stores/widgets/StopGapWidgetDriver-test.ts b/test/stores/widgets/StopGapWidgetDriver-test.ts index 2d4fe90e1f..4e8764a854 100644 --- a/test/stores/widgets/StopGapWidgetDriver-test.ts +++ b/test/stores/widgets/StopGapWidgetDriver-test.ts @@ -209,7 +209,6 @@ describe("StopGapWidgetDriver", () => { }); await expect(driver.readEventRelations('$event')).resolves.toEqual({ - originalEvent: expect.objectContaining({ content: {} }), chunk: [], nextBatch: undefined, prevBatch: undefined, @@ -218,24 +217,6 @@ describe("StopGapWidgetDriver", () => { expect(client.relations).toBeCalledWith('!this-room-id', '$event', null, null, {}); }); - it('reads related events if the original event is missing', async () => { - client.relations.mockResolvedValue({ - // the relations function can return an undefined event, even - // though the typings don't permit an undefined value. - originalEvent: undefined as any, - events: [], - }); - - await expect(driver.readEventRelations('$event', '!room-id')).resolves.toEqual({ - originalEvent: undefined, - chunk: [], - nextBatch: undefined, - prevBatch: undefined, - }); - - expect(client.relations).toBeCalledWith('!room-id', '$event', null, null, {}); - }); - it('reads related events from a selected room', async () => { client.relations.mockResolvedValue({ originalEvent: new MatrixEvent(), @@ -244,7 +225,6 @@ describe("StopGapWidgetDriver", () => { }); await expect(driver.readEventRelations('$event', '!room-id')).resolves.toEqual({ - originalEvent: expect.objectContaining({ content: {} }), chunk: [ expect.objectContaining({ content: {} }), expect.objectContaining({ content: {} }), @@ -272,7 +252,6 @@ describe("StopGapWidgetDriver", () => { 25, 'f', )).resolves.toEqual({ - originalEvent: expect.objectContaining({ content: {} }), chunk: [], nextBatch: undefined, prevBatch: undefined,