Skip to content

Commit 7b6c710

Browse files
committed
Add MatrixClient.doesServerSupportLogoutDevices() for MSC2457
1 parent c3d7a49 commit 7b6c710

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/client.ts

+9
Original file line numberDiff line numberDiff line change
@@ -6593,6 +6593,15 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
65936593
}
65946594
}
65956595

6596+
/**
6597+
* Query the server to see if it supports the MSC2457 `logout_devices` parameter when setting password
6598+
* @return {Promise<boolean>} true if server supports the `logout_devices` parameter
6599+
*/
6600+
public async doesServerSupportLogoutDevices(): Promise<boolean> {
6601+
const response = await this.getVersions();
6602+
return response?.versions?.includes("r0.6.1");
6603+
}
6604+
65966605
/**
65976606
* Get if lazy loading members is being used.
65986607
* @return {boolean} Whether or not members are lazy loaded by this client

0 commit comments

Comments
 (0)