You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
cancel with m.user code when user doesn't reciprocate
This commit is contained in:
@@ -23,6 +23,7 @@ limitations under the License.
|
|||||||
import {VerificationBase as Base} from "./Base";
|
import {VerificationBase as Base} from "./Base";
|
||||||
import {
|
import {
|
||||||
newKeyMismatchError,
|
newKeyMismatchError,
|
||||||
|
newUserCancelledError,
|
||||||
} from './Error';
|
} from './Error';
|
||||||
import {encodeUnpaddedBase64, decodeBase64} from "../olmlib";
|
import {encodeUnpaddedBase64, decodeBase64} from "../olmlib";
|
||||||
|
|
||||||
@@ -59,7 +60,7 @@ export class ReciprocateQRCode extends Base {
|
|||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
this.reciprocateQREvent = {
|
this.reciprocateQREvent = {
|
||||||
confirm: resolve,
|
confirm: resolve,
|
||||||
cancel: reject, // which code should we cancel with here?
|
cancel: () => reject(newUserCancelledError()),
|
||||||
};
|
};
|
||||||
this.emit("show_reciprocate_qr", this.reciprocateQREvent);
|
this.emit("show_reciprocate_qr", this.reciprocateQREvent);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user