Skip to content

Commit e6a21cc

Browse files
authored
Merge pull request #1637 from matrix-org/t3chguy/spaces4.5
Add space summary suggested only param
2 parents 6c5fc15 + 2f71c93 commit e6a21cc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/base-apis.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2378,18 +2378,27 @@ MatrixBaseApis.prototype.reportEvent = function(roomId, eventId, score, reason)
23782378
* Fetches or paginates a summary of a space as defined by MSC2946
23792379
* @param {string} roomId The ID of the space-room to use as the root of the summary.
23802380
* @param {number?} maxRoomsPerSpace The maximum number of rooms to return per subspace.
2381+
* @param {boolean?} suggestedOnly Whether to only return rooms with suggested=true.
23812382
* @param {boolean?} autoJoinOnly Whether to only return rooms with auto_join=true.
23822383
* @param {number?} limit The maximum number of rooms to return in total.
23832384
* @param {string?} batch The opaque token to paginate a previous summary request.
23842385
* @returns {Promise} the response, with next_batch, rooms, events fields.
23852386
*/
2386-
MatrixBaseApis.prototype.getSpaceSummary = function(roomId, maxRoomsPerSpace, autoJoinOnly, limit, batch) {
2387+
MatrixBaseApis.prototype.getSpaceSummary = function(
2388+
roomId,
2389+
maxRoomsPerSpace,
2390+
suggestedOnly,
2391+
autoJoinOnly,
2392+
limit,
2393+
batch,
2394+
) {
23872395
const path = utils.encodeUri("/rooms/$roomId/spaces", {
23882396
$roomId: roomId,
23892397
});
23902398

23912399
return this._http.authedRequest(undefined, "POST", path, null, {
23922400
max_rooms_per_space: maxRoomsPerSpace,
2401+
suggested_only: suggestedOnly,
23932402
auto_join_only: autoJoinOnly,
23942403
limit,
23952404
batch,

0 commit comments

Comments
 (0)