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 #589 from johbo/add-thirdparty-user
Add getThirdpartyUser to base api
This commit is contained in:
@@ -1833,7 +1833,7 @@ MatrixBaseApis.prototype.getThirdpartyProtocols = function() {
|
|||||||
* Get information on how a specific place on a third party protocol
|
* Get information on how a specific place on a third party protocol
|
||||||
* may be reached.
|
* may be reached.
|
||||||
* @param {string} protocol The protocol given in getThirdpartyProtocols()
|
* @param {string} protocol The protocol given in getThirdpartyProtocols()
|
||||||
* @param {object} params Protocol-specific parameters, as given in th
|
* @param {object} params Protocol-specific parameters, as given in the
|
||||||
* response to getThirdpartyProtocols()
|
* response to getThirdpartyProtocols()
|
||||||
* @return {module:client.Promise} Resolves to the result object
|
* @return {module:client.Promise} Resolves to the result object
|
||||||
*/
|
*/
|
||||||
@@ -1848,6 +1848,25 @@ MatrixBaseApis.prototype.getThirdpartyLocation = function(protocol, params) {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get information on how a specific user 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 the
|
||||||
|
* response to getThirdpartyProtocols()
|
||||||
|
* @return {module:client.Promise} Resolves to the result object
|
||||||
|
*/
|
||||||
|
MatrixBaseApis.prototype.getThirdpartyUser = function(protocol, params) {
|
||||||
|
const path = utils.encodeUri("/thirdparty/user/$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