diff --git a/src/autodiscovery.ts b/src/autodiscovery.ts index 1d7be9bf2..a300cb049 100644 --- a/src/autodiscovery.ts +++ b/src/autodiscovery.ts @@ -17,13 +17,21 @@ limitations under the License. /** @module auto-discovery */ -import { IClientWellKnown, IWellKnownConfig, AutoDiscoveryAction } from "./client"; +import { IClientWellKnown, IWellKnownConfig } from "./client"; import { logger } from './logger'; import { URL as NodeURL } from "url"; // Dev note: Auto discovery is part of the spec. // See: https://matrix.org/docs/spec/client_server/r0.4.0.html#server-discovery +export enum AutoDiscoveryAction { + SUCCESS = "SUCCESS", + IGNORE = "IGNORE", + PROMPT = "PROMPT", + FAIL_PROMPT = "FAIL_PROMPT", + FAIL_ERROR = "FAIL_ERROR", +} + /** * Utilities for automatically discovery resources, such as homeservers * for users to log in to. diff --git a/src/client.ts b/src/client.ts index 624e39e2a..328c66e14 100644 --- a/src/client.ts +++ b/src/client.ts @@ -31,7 +31,7 @@ import { sleep } from './utils'; import { Group } from "./models/group"; import { Direction, EventTimeline } from "./models/event-timeline"; import { IActionsObject, PushProcessor } from "./pushprocessor"; -import { AutoDiscovery } from "./autodiscovery"; +import { AutoDiscovery, AutoDiscoveryAction } from "./autodiscovery"; import * as olmlib from "./crypto/olmlib"; import { decodeBase64, encodeBase64 } from "./crypto/olmlib"; import { IExportedDevice as IOlmDevice } from "./crypto/OlmDevice"; @@ -490,14 +490,6 @@ export interface IWellKnownConfig { base_url?: string | null; } -export enum AutoDiscoveryAction { - SUCCESS = "SUCCESS", - IGNORE = "IGNORE", - PROMPT = "PROMPT", - FAIL_PROMPT = "FAIL_PROMPT", - FAIL_ERROR = "FAIL_ERROR", -} - interface IKeyBackupPath { path: string; queryData?: {