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

Rename target device prop

This commit is contained in:
Travis Ralston
2020-02-07 15:37:34 +00:00
parent 9eadc7f868
commit efad46a8a4

View File

@@ -273,13 +273,13 @@ export class VerificationRequest extends EventEmitter {
} }
/** /**
* Estimates which device the verification should be started with * Gets which device the verification should be started with
* given the events sent so far in the verification. This is the * given the events sent so far in the verification. This is the
* same algorithm used to determine which device to send the * same algorithm used to determine which device to send the
* verification to when no specific device is specified. * verification to when no specific device is specified.
* @returns {{userId: *, deviceId: *}} The device information * @returns {{userId: *, deviceId: *}} The device information
*/ */
get estimatedTargetDevice() { get targetDevice() {
const theirFirstEvent = const theirFirstEvent =
this._eventsByThem.get(REQUEST_TYPE) || this._eventsByThem.get(REQUEST_TYPE) ||
this._eventsByThem.get(READY_TYPE) || this._eventsByThem.get(READY_TYPE) ||
@@ -665,7 +665,7 @@ export class VerificationRequest extends EventEmitter {
_createVerifier(method, startEvent = null, targetDevice = null) { _createVerifier(method, startEvent = null, targetDevice = null) {
if (!targetDevice) { if (!targetDevice) {
targetDevice = this.estimatedTargetDevice; targetDevice = this.targetDevice;
} }
const {userId, deviceId} = targetDevice; const {userId, deviceId} = targetDevice;