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

Move createNewMatrixCall to the client object

So we can mock it out it tests (and also I'm not sure why it was
like this in the first place: we passed the client in anyway...)

Deprecate createNewMatrixCall
This commit is contained in:
David Baker
2021-04-23 14:36:56 +01:00
parent bca8568d64
commit 4a51ac7a74
2 changed files with 14 additions and 0 deletions

View File

@@ -729,6 +729,17 @@ MatrixClient.prototype.setSupportsCallTransfer = function(supportsCallTransfer)
this._supportsCallTransfer = supportsCallTransfer;
};
/**
* Creates a new call.
* The place*Call methods on the returned call can be used to actually place a call
*
* @param {string} roomId The room the call is to be placed in.
* @return {MatrixCall} the call or null if the browser doesn't support calling.
*/
MatrixClient.prototype.createCall = function(roomId) {
return createNewMatrixCall(this, roomId);
};
/**
* Get the current sync state.
* @return {?string} the sync state, which may be null.