From fa5f2d389a0340daee11666371212253b5e68d26 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 6 Jun 2024 22:01:16 +0100 Subject: [PATCH] Fix incorrect assumptions about required fields in /search response (#4228) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/@types/search.ts | 6 +++--- src/client.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/@types/search.ts b/src/@types/search.ts index 3a6d4fdd57f..bd97e7de07a 100644 --- a/src/@types/search.ts +++ b/src/@types/search.ts @@ -54,9 +54,9 @@ enum GroupKey { } export interface IResultRoomEvents { - count: number; - highlights: string[]; - results: ISearchResult[]; + count?: number; + highlights?: string[]; + results?: ISearchResult[]; state?: { [roomId: string]: IStateEventWithRoomId[] }; groups?: { [groupKey in GroupKey]: { diff --git a/src/client.ts b/src/client.ts index 72e28f52916..1e3c57783cf 100644 --- a/src/client.ts +++ b/src/client.ts @@ -7109,7 +7109,7 @@ export class MatrixClient extends TypedEventEmitter