Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Chat, getEmoji, stringifyMarkdown } from "chat";
import type { AdapterPostableMessage, ChatInstance, Logger, StateAdapter } from "chat";
import { createMemoryState } from "@chat-adapter/state-memory";
import { EventType, MsgType, RelationType, type MatrixClient } from "matrix-js-sdk";
import { MatrixError } from "matrix-js-sdk/lib/http-api/errors";
import { encodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key";
import { MatrixError } from "matrix-js-sdk/lib/http-api/errors.js";
import { encodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
import { createMatrixAdapter, MatrixAdapter } from "./index";
import { isMentioned } from "./messages/inbound";
import { splitOversizedTextContent } from "./messages/outbound";
Expand Down
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ import sdk, {
ThreadFilterType,
THREAD_RELATION_TYPE,
} from "matrix-js-sdk";
import type { IStore } from "matrix-js-sdk/lib/store";
import type { IStore } from "matrix-js-sdk/lib/store/index.js";
import type {
RoomMessageEventContent,
} from "matrix-js-sdk/lib/@types/events";
import type { MediaEventContent } from "matrix-js-sdk/lib/@types/media";
import { MatrixError } from "matrix-js-sdk/lib/http-api/errors";
import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key";
import { logger as matrixSDKLogger } from "matrix-js-sdk/lib/logger";
} from "matrix-js-sdk/lib/@types/events.js";
import type { MediaEventContent } from "matrix-js-sdk/lib/@types/media.js";
import { MatrixError } from "matrix-js-sdk/lib/http-api/errors.js";
import { decodeRecoveryKey } from "matrix-js-sdk/lib/crypto-api/recovery-key.js";
import { logger as matrixSDKLogger } from "matrix-js-sdk/lib/logger.js";
import {
DEFAULT_COMMAND_PREFIX,
FAST_SYNC_DEFAULTS,
Expand Down
6 changes: 3 additions & 3 deletions src/messages/outbound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import {
stringifyMarkdown,
} from "chat";
import { marked } from "marked";
import { MatrixError } from "matrix-js-sdk/lib/http-api/errors";
import { MatrixError } from "matrix-js-sdk/lib/http-api/errors.js";
import { MsgType, RelationType } from "matrix-js-sdk";
import type {
RoomMessageEventContent,
RoomMessageTextEventContent,
} from "matrix-js-sdk/lib/@types/events";
import type { MediaEventContent } from "matrix-js-sdk/lib/@types/media";
} from "matrix-js-sdk/lib/@types/events.js";
import type { MediaEventContent } from "matrix-js-sdk/lib/@types/media.js";
import {
escapeHTML,
escapeMarkdownLinkText,
Expand Down
4 changes: 2 additions & 2 deletions src/store/chat-state-matrix-store.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { Logger, StateAdapter } from "chat";
import { createMemoryState } from "@chat-adapter/state-memory";
import type { IStateEventWithRoomId } from "matrix-js-sdk/lib/@types/search";
import type { IndexedToDeviceBatch } from "matrix-js-sdk/lib/models/ToDeviceMessage";
import type { IStateEventWithRoomId } from "matrix-js-sdk/lib/@types/search.js";
import type { IndexedToDeviceBatch } from "matrix-js-sdk/lib/models/ToDeviceMessage.js";
import { ChatStateMatrixStore } from "./chat-state-matrix-store";

function makeLogger(): Logger {
Expand Down
12 changes: 6 additions & 6 deletions src/store/chat-state-matrix-store.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { Logger, StateAdapter } from "chat";
import { MatrixEvent, type IStartClientOpts } from "matrix-js-sdk";
import type { IEvent } from "matrix-js-sdk/lib/models/event";
import type { IEvent } from "matrix-js-sdk/lib/models/event.js";
import type {
IndexedToDeviceBatch,
ToDeviceBatchWithTxnId,
} from "matrix-js-sdk/lib/models/ToDeviceMessage";
import { SyncAccumulator, type ISyncResponse } from "matrix-js-sdk/lib/sync-accumulator";
import type { IStateEventWithRoomId } from "matrix-js-sdk/lib/@types/search";
import { MemoryStore } from "matrix-js-sdk/lib/store/memory";
import type { ISavedSync } from "matrix-js-sdk/lib/store";
} from "matrix-js-sdk/lib/models/ToDeviceMessage.js";
import { SyncAccumulator, type ISyncResponse } from "matrix-js-sdk/lib/sync-accumulator.js";
import type { IStateEventWithRoomId } from "matrix-js-sdk/lib/@types/search.js";
import { MemoryStore } from "matrix-js-sdk/lib/store/memory.js";
import type { ISavedSync } from "matrix-js-sdk/lib/store/index.js";

const STORE_VERSION = 1;
const DEFAULT_PERSIST_INTERVAL_MS = 30_000;
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ICreateClientOpts, IStartClientOpts, MatrixClient } from "matrix-js-sdk";
import type { Logger, StateAdapter } from "chat";
import type { IStore } from "matrix-js-sdk/lib/store";
import type { IStore } from "matrix-js-sdk/lib/store/index.js";

export interface MatrixE2EEConfig {
cryptoDatabasePrefix?: string;
Expand Down