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

Add function to get currently joined rooms.

This commit is contained in:
Richard Lewis
2018-11-04 21:49:17 +00:00
committed by Bruno Windels
parent fbe174fb64
commit 23efd0850d

View File

@@ -939,6 +939,14 @@ MatrixBaseApis.prototype.setRoomReadMarkersHttpRequest =
);
};
/**
* @return {module:client.Promise} Resolves: A list of the user's current rooms
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
MatrixBaseApis.prototype.getJoinedRooms = function() {
const path = utils.encodeUri("/joined_rooms");
return this._http.authedRequest(undefined, "GET", path);
};
// Room Directory operations
// =========================