You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-19 10:22:30 +03:00
Merge pull request #217 from matrix-org/dbkr/join_3p_location
Add API for 3rd party location lookup
This commit is contained in:
@@ -1039,6 +1039,39 @@ MatrixBaseApis.prototype.sendToDevice = function(
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Third party Lookup API
|
||||||
|
// ======================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the third party protocols that can be reached using
|
||||||
|
* this HS
|
||||||
|
* @return {module:client.Promise} Resolves to the result object
|
||||||
|
*/
|
||||||
|
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()
|
||||||
|
* @return {module:client.Promise} Resolves to the result object
|
||||||
|
*/
|
||||||
|
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