File tree 1 file changed +21
-1
lines changed
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -7815,15 +7815,35 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
7815
7815
* Make a request to change your password.
7816
7816
* @param {Object } authDict
7817
7817
* @param {string } newPassword The new desired password.
7818
+ * @param {boolean } logoutDevices Should all sessions be logged out after the password change. Defaults to true.
7818
7819
* @param {module:client.callback } callback Optional.
7819
7820
* @return {Promise } Resolves: TODO
7820
7821
* @return {module:http-api.MatrixError } Rejects: with an error response.
7821
7822
*/
7822
- public setPassword ( authDict : any , newPassword : string , callback ?: Callback ) : Promise < any > { // TODO: Types
7823
+ public setPassword (
7824
+ authDict : any ,
7825
+ newPassword : string ,
7826
+ logoutDevices : boolean ,
7827
+ callback ?: Callback
7828
+ ) : Promise < any > ;
7829
+ public setPassword (
7830
+ authDict : any ,
7831
+ newPassword : string ,
7832
+ logoutDevices ?: Callback | boolean ,
7833
+ callback ?: Callback ,
7834
+ ) : Promise < any > { // TODO: Types
7835
+ if ( typeof logoutDevices !== 'boolean' ) {
7836
+ logoutDevices = true ;
7837
+ }
7838
+ if ( typeof logoutDevices === 'function' ) {
7839
+ callback = logoutDevices ;
7840
+ }
7841
+
7823
7842
const path = "/account/password" ;
7824
7843
const data = {
7825
7844
'auth' : authDict ,
7826
7845
'new_password' : newPassword ,
7846
+ 'logout_devices' : logoutDevices ,
7827
7847
} ;
7828
7848
7829
7849
return this . http . authedRequest (
You can’t perform that action at this time.
0 commit comments