This commit is contained in:
David Baker 2024-12-11 15:23:58 +00:00 committed by GitHub
commit c9126daa6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 214 additions and 1220 deletions

View file

@ -41,6 +41,7 @@ import PlatformPeg from "./PlatformPeg";
import { formatList } from "./utils/FormattingUtils";
import SdkConfig from "./SdkConfig";
import { setDeviceIsolationMode } from "./settings/controllers/DeviceIsolationModeController.ts";
import SlidingSyncController from "./settings/controllers/SlidingSyncController";
export interface IMatrixClientCreds {
homeserverUrl: string;
@ -297,10 +298,16 @@ class MatrixClientPegClass implements IMatrixClientPeg {
opts.clientWellKnownPollPeriod = 2 * 60 * 60; // 2 hours
opts.threadSupport = true;
/* TODO: Uncomment before PR lands
if (SettingsStore.getValue("feature_sliding_sync")) {
opts.slidingSync = await SlidingSyncManager.instance.setup(this.matrixClient);
} else {
SlidingSyncManager.instance.checkSupport(this.matrixClient);
} */
// TODO: remove before PR lands. Defaults to SSS if the server entered supports it.
await SlidingSyncManager.instance.checkSupport(this.matrixClient);
if (SlidingSyncController.serverSupportsSlidingSync) {
opts.slidingSync = await SlidingSyncManager.instance.setup(this.matrixClient);
}
// Connect the matrix client to the dispatcher and setting handlers