From 737d37326a3aae44eb04042f69145e938e35fe71 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 24 Nov 2021 16:44:24 +0000 Subject: [PATCH] Add sync3 API call With some manual tests in the HTML test jig. --- src/matrix/net/HomeServerApi.js | 4 ++++ src/placeholder-rooms.html | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/src/matrix/net/HomeServerApi.js b/src/matrix/net/HomeServerApi.js index 308e71d9..91ffc97c 100644 --- a/src/matrix/net/HomeServerApi.js +++ b/src/matrix/net/HomeServerApi.js @@ -110,6 +110,10 @@ export class HomeServerApi { return this._get("/sync", {since, timeout, filter}, null, options); } + sync3(body, pos, timeout, options = null) { + return this._authedRequest("POST", this._url("/sync", "/_matrix/client/v3"), {timeout, pos}, body, 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); diff --git a/src/placeholder-rooms.html b/src/placeholder-rooms.html index 5f0f305e..a4e7de46 100644 --- a/src/placeholder-rooms.html +++ b/src/placeholder-rooms.html @@ -11,6 +11,8 @@ + +