You've already forked matrix-js-sdk
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:
@@ -191,6 +191,14 @@ MatrixClient.prototype.getIdentityServerUrl = function() {
|
|||||||
return this.idBaseUrl;
|
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.
|
* Check if the runtime environment supports VoIP calling.
|
||||||
* @return {boolean} True if VoIP is supported.
|
* @return {boolean} True if VoIP is supported.
|
||||||
|
|||||||
Reference in New Issue
Block a user