From ae6e211150025e34ee508796434dcf51dd1ea68f Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 7 Sep 2021 11:47:05 -0700 Subject: [PATCH] Add a context call --- src/matrix/net/HomeServerApi.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/matrix/net/HomeServerApi.js b/src/matrix/net/HomeServerApi.js index 4b53b28b..792b4ff6 100644 --- a/src/matrix/net/HomeServerApi.js +++ b/src/matrix/net/HomeServerApi.js @@ -107,6 +107,10 @@ export class HomeServerApi { return this._get("/sync", {since, timeout, filter}, null, options); } + context(roomId, eventId, params, options = null) { + return this._get(`/rooms/${encodeURIComponent(roomId)}/context/${encodeURIComponent(eventId)}`, params, null, options); + } + // params is from, dir and optionally to, limit, filter. messages(roomId, params, options = null) { return this._get(`/rooms/${encodeURIComponent(roomId)}/messages`, params, null, options);