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
Make js-sdk compatible with older synapses
Use GET API if no params given. Revert changelog entry since it now doesn't break older synapses.
This commit is contained in:
@@ -1,10 +1,3 @@
|
|||||||
Unreleased Changed:
|
|
||||||
===================
|
|
||||||
|
|
||||||
**BREAKING CHANGES**:
|
|
||||||
* /publicRooms now uses the new POST API. This is only present
|
|
||||||
on synapse versions 0.18.0-rc1 and later.
|
|
||||||
|
|
||||||
Changes in [0.5.6](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.5.6) (2016-08-28)
|
Changes in [0.5.6](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.5.6) (2016-08-28)
|
||||||
================================================================================================
|
================================================================================================
|
||||||
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.5.5...v0.5.6)
|
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.5.5...v0.5.6)
|
||||||
|
|||||||
@@ -441,9 +441,13 @@ MatrixBaseApis.prototype.publicRooms = function(options, callback) {
|
|||||||
delete options.server;
|
delete options.server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Object.keys(options).length === 0 && Object.keys(query_params).length === 0) {
|
||||||
|
return this._http.authedRequest(callback, "GET", "/publicRooms");
|
||||||
|
} else {
|
||||||
return this._http.authedRequest(
|
return this._http.authedRequest(
|
||||||
callback, "POST", "/publicRooms", query_params, options
|
callback, "POST", "/publicRooms", query_params, options
|
||||||
);
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user