You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Add API for 3rd party location lookup
This commit is contained in:
@@ -1039,6 +1039,37 @@ MatrixBaseApis.prototype.sendToDevice = function(
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Third party Lookup API
|
||||||
|
// ======================
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the third party protocols that can be reached using
|
||||||
|
* this HS
|
||||||
|
*/
|
||||||
|
MatrixBaseApis.prototype.getThirdpartyProtocols = function() {
|
||||||
|
return this._http.authedRequestWithPrefix(
|
||||||
|
undefined, "GET", "/thirdparty/protocols", undefined, undefined,
|
||||||
|
httpApi.PREFIX_UNSTABLE
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get information on how a specific place on a third party protocol
|
||||||
|
* may be reached.
|
||||||
|
* @param {string} protocol The protocol given in getThirdpartyProtocols()
|
||||||
|
* @param {object} params Protocol-specific parameters, as given in th
|
||||||
|
* response to getThirdpartyProtocols()
|
||||||
|
*/
|
||||||
|
MatrixBaseApis.prototype.getThirdpartyLocation = function(protocol, params) {
|
||||||
|
var path = utils.encodeUri("/thirdparty/location/$protocol", {
|
||||||
|
$protocol: protocol
|
||||||
|
});
|
||||||
|
|
||||||
|
return this._http.authedRequestWithPrefix(
|
||||||
|
undefined, "GET", path, params, undefined,
|
||||||
|
httpApi.PREFIX_UNSTABLE
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MatrixBaseApis object
|
* MatrixBaseApis object
|
||||||
|
|||||||
Reference in New Issue
Block a user