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);