Add a context call

This commit is contained in:
Danila Fedorin 2021-09-07 11:47:05 -07:00
parent 8d7c12fd59
commit ae6e211150

View file

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