1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Return IJoinedRoomsResponse from getJoinedRooms(), instead of string[]

Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
This commit is contained in:
Paulo Pinto
2021-09-23 13:35:42 +01:00
parent 92f7ddcf3e
commit 1485969493

View File

@@ -568,6 +568,10 @@ interface IRoomInitialSyncResponse {
presence: Partial<IEvent>; // legacy and undocumented, api is deprecated so this won't get attention
}
interface IJoinedRoomsResponse {
joined_rooms: string[];
}
interface IJoinedMembersResponse {
joined: {
[userId: string]: {
@@ -6674,7 +6678,7 @@ export class MatrixClient extends EventEmitter {
* @return {Promise} Resolves: A list of the user's current rooms
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
public getJoinedRooms(): Promise<string[]> {
public getJoinedRooms(): Promise<IJoinedRoomsResponse> {
const path = utils.encodeUri("/joined_rooms", {});
return this.http.authedRequest(undefined, "GET", path);
}