You've already forked matrix-js-sdk
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user