From 18b7a649104656799554cd50a472dd78f9d6b2ad Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 31 Aug 2021 13:17:49 -0600 Subject: [PATCH] Remove arbitrary limits from send/receive events for widgets Fixes https://github.com/vector-im/element-web/issues/17994 As per MSC change: https://github.com/matrix-org/matrix-doc/pull/2762/commits/aeadae81e2d68f76523eb61ff0ebbbd5c3202deb --- src/stores/widgets/StopGapWidgetDriver.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index d473ecf3b1..c0f627b9c0 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -163,7 +163,7 @@ export class StopGapWidgetDriver extends WidgetDriver { } public async readRoomEvents(eventType: string, msgtype: string | undefined, limit: number): Promise { - limit = limit > 0 ? Math.min(limit, 25) : 25; // arbitrary choice + limit = limit > 0 ? Math.min(limit, Number.MAX_SAFE_INTEGER) : Number.MAX_SAFE_INTEGER; // relatively arbitrary const client = MatrixClientPeg.get(); const roomId = ActiveRoomObserver.activeRoomId; @@ -185,7 +185,7 @@ export class StopGapWidgetDriver extends WidgetDriver { } public async readStateEvents(eventType: string, stateKey: string | undefined, limit: number): Promise { - limit = limit > 0 ? Math.min(limit, 100) : 100; // arbitrary choice + limit = limit > 0 ? Math.min(limit, Number.MAX_SAFE_INTEGER) : Number.MAX_SAFE_INTEGER; // relatively arbitrary const client = MatrixClientPeg.get(); const roomId = ActiveRoomObserver.activeRoomId;