mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
Move interface into new file
This commit is contained in:
parent
a87edcf99e
commit
209acaf60e
@ -19,6 +19,7 @@ import type {DeviceTracker} from "../../../e2ee/DeviceTracker.js";
|
||||
import type {ILogItem} from "../../../../logging/types";
|
||||
import type {Clock} from "../../../../platform/web/dom/Clock.js";
|
||||
import type {DeviceMessageHandler} from "../../../DeviceMessageHandler.js";
|
||||
import type {IChannel} from "./IChannel";
|
||||
import {makeTxnId} from "../../../common.js";
|
||||
import {CancelReason, VerificationEventType} from "./types";
|
||||
import {Disposables} from "../../../../utils/Disposables";
|
||||
@ -39,21 +40,6 @@ const messageFromErrorType = {
|
||||
[CancelReason.MismatchedSAS]: "Emoji/decimal does not match.",
|
||||
}
|
||||
|
||||
export interface IChannel {
|
||||
send(eventType: VerificationEventType, content: any, log: ILogItem): Promise<void>;
|
||||
waitForEvent(eventType: VerificationEventType): Promise<any>;
|
||||
getSentMessage(event: VerificationEventType): any;
|
||||
getReceivedMessage(event: VerificationEventType): any;
|
||||
setStartMessage(content: any): void;
|
||||
cancelVerification(cancellationType: CancelReason): Promise<void>;
|
||||
acceptMessage: any;
|
||||
startMessage: any;
|
||||
initiatedByUs: boolean;
|
||||
isCancelled: boolean;
|
||||
cancellation?: { code: CancelReason, cancelledByUs: boolean };
|
||||
id: string;
|
||||
otherUserDeviceId: string;
|
||||
}
|
||||
|
||||
type Options = {
|
||||
hsApi: HomeServerApi;
|
||||
|
34
src/matrix/verification/SAS/channel/IChannel.ts
Normal file
34
src/matrix/verification/SAS/channel/IChannel.ts
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import type {ILogItem} from "../../../../logging/types";
|
||||
import {CancelReason, VerificationEventType} from "./types";
|
||||
|
||||
export interface IChannel {
|
||||
send(eventType: VerificationEventType, content: any, log: ILogItem): Promise<void>;
|
||||
waitForEvent(eventType: VerificationEventType): Promise<any>;
|
||||
getSentMessage(event: VerificationEventType): any;
|
||||
getReceivedMessage(event: VerificationEventType): any;
|
||||
setStartMessage(content: any): void;
|
||||
cancelVerification(cancellationType: CancelReason): Promise<void>;
|
||||
acceptMessage: any;
|
||||
startMessage: any;
|
||||
initiatedByUs: boolean;
|
||||
isCancelled: boolean;
|
||||
cancellation?: { code: CancelReason, cancelledByUs: boolean };
|
||||
id: string;
|
||||
otherUserDeviceId: string;
|
||||
}
|
Loading…
Reference in New Issue
Block a user