From 0c42f53a2f63e307bf7d62baa6b2bc63e3b5f2d9 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 7 Dec 2021 12:18:51 +0530 Subject: [PATCH] Implement context endpoint --- src/matrix/net/HomeServerApi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/net/HomeServerApi.ts b/src/matrix/net/HomeServerApi.ts index db5e281b..3a6517cd 100644 --- a/src/matrix/net/HomeServerApi.ts +++ b/src/matrix/net/HomeServerApi.ts @@ -128,8 +128,8 @@ export class HomeServerApi { return this._get("/sync", {since, timeout, filter}, undefined, options); } - event(roomId, eventId) { - return this._get(`/rooms/${encodeURIComponent(roomId)}/event/${encodeURIComponent(eventId)}`); + context(roomId: string, eventId: string, limit: number, filter: string): IHomeServerRequest { + return this._get(`/rooms/${encodeURIComponent(roomId)}/context/${encodeURIComponent(eventId)}`, {filter, limit}); } // params is from, dir and optionally to, limit, filter.