From 6af6e994808c0edcd2919dc71a586cb284dba01c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 23 Jan 2020 20:05:56 -0700 Subject: [PATCH] Expose the request event more readily for consumers --- src/crypto/verification/request/VerificationRequest.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/crypto/verification/request/VerificationRequest.js b/src/crypto/verification/request/VerificationRequest.js index 963346f42..070d6d802 100644 --- a/src/crypto/verification/request/VerificationRequest.js +++ b/src/crypto/verification/request/VerificationRequest.js @@ -159,6 +159,14 @@ export class VerificationRequest extends EventEmitter { return 0; } + /** + * The key verification request event. + * @returns {MatrixEvent} The request event, or falsey if not found. + */ + get requestEvent() { + return this._getEventByEither(REQUEST_TYPE); + } + /** current phase of the request. Some properties might only be defined in a current phase. */ get phase() { return this._phase;