You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-07 23:02:56 +03:00
Fix 3pid invite acceptance not working due to mxid being sent in body (#2907)
This commit is contained in:
committed by
GitHub
parent
77d6def1cc
commit
007b7dd242
@@ -173,7 +173,9 @@ describe("MatrixClient", function() {
|
|||||||
signatures: {},
|
signatures: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
httpBackend!.when("POST", inviteSignUrl).respond(200, signature);
|
httpBackend!.when("POST", inviteSignUrl).check(request => {
|
||||||
|
expect(request.queryParams?.mxid).toEqual(client!.getUserId());
|
||||||
|
}).respond(200, signature);
|
||||||
httpBackend!.when("POST", "/join/" + encodeURIComponent(roomId)).check(request => {
|
httpBackend!.when("POST", "/join/" + encodeURIComponent(roomId)).check(request => {
|
||||||
expect(request.data.third_party_signed).toEqual(signature);
|
expect(request.data.third_party_signed).toEqual(signature);
|
||||||
}).respond(200, { room_id: roomId });
|
}).respond(200, { room_id: roomId });
|
||||||
|
@@ -3629,10 +3629,9 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|||||||
let signPromise: Promise<IThirdPartySigned | void> = Promise.resolve();
|
let signPromise: Promise<IThirdPartySigned | void> = Promise.resolve();
|
||||||
|
|
||||||
if (opts.inviteSignUrl) {
|
if (opts.inviteSignUrl) {
|
||||||
signPromise = this.http.requestOtherUrl<IThirdPartySigned>(
|
const url = new URL(opts.inviteSignUrl);
|
||||||
Method.Post,
|
url.searchParams.set("mxid", this.credentials.userId!);
|
||||||
new URL(opts.inviteSignUrl), { mxid: this.credentials.userId },
|
signPromise = this.http.requestOtherUrl<IThirdPartySigned>(Method.Post, url);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryString: Record<string, string | string[]> = {};
|
const queryString: Record<string, string | string[]> = {};
|
||||||
|
Reference in New Issue
Block a user