You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Improve types to match reality (#3510)
This commit is contained in:
committed by
GitHub
parent
acbcb4658a
commit
de64779c27
@@ -176,7 +176,8 @@ export interface IAddThreePidOnlyBody {
|
|||||||
export interface IBindThreePidBody {
|
export interface IBindThreePidBody {
|
||||||
client_secret: string;
|
client_secret: string;
|
||||||
id_server: string;
|
id_server: string;
|
||||||
id_access_token: string;
|
// Some older identity servers have no auth enabled
|
||||||
|
id_access_token: string | null;
|
||||||
sid: string;
|
sid: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9097,6 +9097,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|||||||
* @param msisdnToken - The MSISDN token, as enetered by the user.
|
* @param msisdnToken - The MSISDN token, as enetered by the user.
|
||||||
* @param identityAccessToken - The `access_token` field of the Identity
|
* @param identityAccessToken - The `access_token` field of the Identity
|
||||||
* Server `/account/register` response (see {@link registerWithIdentityServer}).
|
* Server `/account/register` response (see {@link registerWithIdentityServer}).
|
||||||
|
* Some legacy identity servers had no authentication here.
|
||||||
*
|
*
|
||||||
* @returns Promise which resolves: Object, containing success boolean.
|
* @returns Promise which resolves: Object, containing success boolean.
|
||||||
* @returns Rejects: with an error response.
|
* @returns Rejects: with an error response.
|
||||||
@@ -9106,7 +9107,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|||||||
sid: string,
|
sid: string,
|
||||||
clientSecret: string,
|
clientSecret: string,
|
||||||
msisdnToken: string,
|
msisdnToken: string,
|
||||||
identityAccessToken: string,
|
identityAccessToken: string | null,
|
||||||
): Promise<{ success: boolean }> {
|
): Promise<{ success: boolean }> {
|
||||||
const params = {
|
const params = {
|
||||||
sid: sid,
|
sid: sid,
|
||||||
@@ -9119,7 +9120,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|||||||
"/validate/msisdn/submitToken",
|
"/validate/msisdn/submitToken",
|
||||||
params,
|
params,
|
||||||
IdentityPrefix.V2,
|
IdentityPrefix.V2,
|
||||||
identityAccessToken,
|
identityAccessToken ?? undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user