1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

add logging when a request is being cancelled

so we can more easily see (especially for to_device requests)
why something was cancelled
This commit is contained in:
Bruno Windels
2020-02-04 12:44:17 +01:00
parent 57a7328065
commit 8bc0ef8c27

View File

@@ -557,6 +557,15 @@ export class VerificationRequest extends EventEmitter {
} else if (this._observeOnly !== wasObserveOnly) { } else if (this._observeOnly !== wasObserveOnly) {
this.emit("change"); this.emit("change");
} }
// log cancellations so we can see from rageshakes why riot sometimes cancels
// requests on its own
if (type === CANCEL_TYPE) {
logger.log(`verification request ${this.channel.transactionId}: ` +
`.cancel event with ${JSON.stringify(event.getContent())} ` +
`sender=${event.getSender()}, isSentByUs=${isSentByUs} ` +
`phase=${this.phase}`);
}
} }
_setupTimeout(phase) { _setupTimeout(phase) {