1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

add a cli.getDomain() method rather than react-sdk maintaining its own (multiple) implementations

This commit is contained in:
Matthew Hodgson
2016-01-11 18:23:07 +00:00
parent 57072bc4f4
commit 051e83582b

View File

@@ -191,6 +191,14 @@ MatrixClient.prototype.getIdentityServerUrl = function() {
return this.idBaseUrl;
};
/**
* Get the domain for this client's MXID
* @return {string} Domain of this MXID
*/
MatrixClient.prototype.getDomain = function() {
return this.credentials.userId.replace(/^.*:/, '');
};
/**
* Check if the runtime environment supports VoIP calling.
* @return {boolean} True if VoIP is supported.