1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-07 05:22:15 +03:00

Merge pull request #1959 from psrpinto/fix/joined-rooms-response

This commit is contained in:
Germain
2021-09-30 17:54:53 +01:00
committed by GitHub

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);
}