You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Merge pull request #1000 from matrix-org/t3chguy/remove_authedRequestWithPrefix
Remove deprecated authedRequestWithPrefix and requestWithPrefix
This commit is contained in:
@@ -1369,8 +1369,10 @@ MatrixClient.prototype.getGroups = function() {
|
||||
* @return {module:client.Promise} Resolves with an object containing the config.
|
||||
*/
|
||||
MatrixClient.prototype.getMediaConfig = function(callback) {
|
||||
return this._http.authedRequestWithPrefix(
|
||||
callback, "GET", "/config", undefined, undefined, httpApi.PREFIX_MEDIA_R0,
|
||||
return this._http.authedRequest(
|
||||
callback, "GET", "/config", undefined, undefined, {
|
||||
prefix: httpApi.PREFIX_MEDIA_R0,
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
@@ -2275,11 +2277,13 @@ MatrixClient.prototype.getUrlPreview = function(url, ts, callback) {
|
||||
}
|
||||
|
||||
const self = this;
|
||||
return this._http.authedRequestWithPrefix(
|
||||
return this._http.authedRequest(
|
||||
callback, "GET", "/preview_url", {
|
||||
url: url,
|
||||
ts: ts,
|
||||
}, undefined, httpApi.PREFIX_MEDIA_R0,
|
||||
}, undefined, {
|
||||
prefix: httpApi.PREFIX_MEDIA_R0,
|
||||
},
|
||||
).then(function(response) {
|
||||
// TODO: expire cache occasionally
|
||||
self.urlPreviewCache[key] = response;
|
||||
|
||||
Reference in New Issue
Block a user