diff --git a/src/crypto/verification/SAS.js b/src/crypto/verification/SAS.js index 367ee1463..3a7f61e54 100644 --- a/src/crypto/verification/SAS.js +++ b/src/crypto/verification/SAS.js @@ -306,7 +306,7 @@ export class SAS extends Base { + this._channel.transactionId; const sasBytes = olmSAS.generate_bytes(sasInfo, 6); const verifySAS = new Promise((resolve, reject) => { - this.emit("show_sas", { + this.sasEvent = { sas: generateSas(sasBytes, sasMethods), confirm: () => { this._sendMAC(olmSAS, macMethod); @@ -314,7 +314,8 @@ export class SAS extends Base { }, cancel: () => reject(newUserCancelledError()), mismatch: () => reject(newMismatchedSASError()), - }); + }; + this.emit("show_sas", this.sasEvent); }); @@ -390,7 +391,7 @@ export class SAS extends Base { + this._channel.transactionId; const sasBytes = olmSAS.generate_bytes(sasInfo, 6); const verifySAS = new Promise((resolve, reject) => { - this.emit("show_sas", { + this.sasEvent = { sas: generateSas(sasBytes, sasMethods), confirm: () => { this._sendMAC(olmSAS, macMethod); @@ -398,7 +399,8 @@ export class SAS extends Base { }, cancel: () => reject(newUserCancelledError()), mismatch: () => reject(newMismatchedSASError()), - }); + }; + this.emit("show_sas", this.sasEvent); });