@unwanted/matrix-sdk-mini 34.12.0-5 → 34.12.0-6
Sign up to get free protection for your applications and to get access to all the features.
- package/git-revision.txt +1 -1
- package/lib/autodiscovery.js +2 -2
- package/lib/autodiscovery.js.map +1 -1
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +2 -2
- package/lib/client.js.map +1 -1
- package/lib/http-api/prefix.d.ts +1 -0
- package/lib/http-api/prefix.d.ts.map +1 -1
- package/lib/http-api/prefix.js +1 -0
- package/lib/http-api/prefix.js.map +1 -1
- package/lib/sync.js +2 -2
- package/lib/sync.js.map +1 -1
- package/package.json +1 -1
- package/src/autodiscovery.ts +2 -2
- package/src/client.ts +2 -1
- package/src/http-api/prefix.ts +2 -0
- package/src/sync.ts +2 -2
package/package.json
CHANGED
package/src/autodiscovery.ts
CHANGED
@@ -17,7 +17,7 @@ limitations under the License.
|
|
17
17
|
|
18
18
|
import { IClientWellKnown, IWellKnownConfig, IServerVersions } from "./client.ts";
|
19
19
|
import { logger } from "./logger.ts";
|
20
|
-
import { MatrixError, Method, timeoutSignal } from "./http-api/index.ts";
|
20
|
+
import { MatrixError, Method, timeoutSignal, VersionsPrefix } from "./http-api/index.ts";
|
21
21
|
import { SUPPORTED_MATRIX_VERSIONS } from "./version-support.ts";
|
22
22
|
|
23
23
|
// Dev note: Auto discovery is part of the spec.
|
@@ -179,7 +179,7 @@ export class AutoDiscovery {
|
|
179
179
|
}
|
180
180
|
|
181
181
|
// Step 3: Make sure the homeserver URL points to a homeserver.
|
182
|
-
const hsVersions = await this.fetchWellKnownObject<IServerVersions>(`${hsUrl}
|
182
|
+
const hsVersions = await this.fetchWellKnownObject<IServerVersions>(`${hsUrl}${VersionsPrefix}`);
|
183
183
|
if (!hsVersions || !Array.isArray(hsVersions.raw?.["versions"])) {
|
184
184
|
logger.error("Invalid /versions response");
|
185
185
|
clientConfig["m.homeserver"].error = AutoDiscovery.ERROR_INVALID_HOMESERVER;
|
package/src/client.ts
CHANGED
@@ -60,6 +60,7 @@ import {
|
|
60
60
|
Upload,
|
61
61
|
UploadOpts,
|
62
62
|
UploadResponse,
|
63
|
+
VersionsPrefix,
|
63
64
|
} from "./http-api/index.ts";
|
64
65
|
import { User, UserEvent, UserEventHandlerMap } from "./models/user.ts";
|
65
66
|
import { getHttpUriForMxc } from "./content-repo.ts";
|
@@ -5019,7 +5020,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
5019
5020
|
|
5020
5021
|
// We send an authenticated request as of MSC4026
|
5021
5022
|
this.serverVersionsPromise = this.http
|
5022
|
-
.authedRequest<IServerVersions>(Method.Get,
|
5023
|
+
.authedRequest<IServerVersions>(Method.Get, VersionsPrefix, undefined, undefined, {
|
5023
5024
|
prefix: "",
|
5024
5025
|
})
|
5025
5026
|
.catch((e) => {
|
package/src/http-api/prefix.ts
CHANGED
package/src/sync.ts
CHANGED
@@ -48,7 +48,7 @@ import {
|
|
48
48
|
IToDeviceEvent,
|
49
49
|
} from "./sync-accumulator.ts";
|
50
50
|
import { MatrixEvent } from "./models/event.ts";
|
51
|
-
import { MatrixError, Method } from "./http-api/index.ts";
|
51
|
+
import { MatrixError, Method, VersionsPrefix } from "./http-api/index.ts";
|
52
52
|
import { ISavedSync } from "./store/index.ts";
|
53
53
|
import { EventType } from "./@types/event.ts";
|
54
54
|
import { IPushRules } from "./@types/PushRules.ts";
|
@@ -1508,7 +1508,7 @@ export class SyncApi {
|
|
1508
1508
|
this.client.http
|
1509
1509
|
.request(
|
1510
1510
|
Method.Get,
|
1511
|
-
|
1511
|
+
VersionsPrefix,
|
1512
1512
|
undefined, // queryParams
|
1513
1513
|
undefined, // data
|
1514
1514
|
{
|