diff --git a/.eslintrc.js b/.eslintrc.js index 7348cee9aa..da1209af16 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -78,6 +78,10 @@ module.exports = { name: "matrix-js-sdk/src/models/room-state", message: "Please use matrix-js-sdk/src/matrix instead", }, + { + name: "matrix-js-sdk/src/models/event", + message: "Please use matrix-js-sdk/src/matrix instead", + }, { name: "matrix-react-sdk", message: "Please use matrix-react-sdk/src/index instead", diff --git a/src/DecryptionFailureTracker.ts b/src/DecryptionFailureTracker.ts index 256fe245ee..668a3bc6fc 100644 --- a/src/DecryptionFailureTracker.ts +++ b/src/DecryptionFailureTracker.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { DecryptionError } from "matrix-js-sdk/src/crypto/algorithms"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Error as ErrorEvent } from "@matrix-org/analytics-events/types/typescript/Error"; import { PosthogAnalytics } from "./PosthogAnalytics"; diff --git a/src/DeviceListener.ts b/src/DeviceListener.ts index d7c845943b..24e7300721 100644 --- a/src/DeviceListener.ts +++ b/src/DeviceListener.ts @@ -14,10 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, ClientEvent, EventType, MatrixClient, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { CryptoEvent } from "matrix-js-sdk/src/crypto"; -import { ClientEvent, EventType, MatrixClient, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { SyncState } from "matrix-js-sdk/src/sync"; import { IKeyBackupInfo } from "matrix-js-sdk/src/crypto/keybackup"; diff --git a/src/HtmlUtils.tsx b/src/HtmlUtils.tsx index 158345903b..17fb1e6ad0 100644 --- a/src/HtmlUtils.tsx +++ b/src/HtmlUtils.tsx @@ -24,7 +24,7 @@ import EMOJIBASE_REGEX from "emojibase-regex"; import { merge } from "lodash"; import katex from "katex"; import { decode } from "html-entities"; -import { IContent } from "matrix-js-sdk/src/models/event"; +import { IContent } from "matrix-js-sdk/src/matrix"; import { Optional } from "matrix-events-sdk"; import _Linkify from "linkify-react"; import escapeHtml from "escape-html"; diff --git a/src/ScalarMessaging.ts b/src/ScalarMessaging.ts index 0c103aa17d..d86bdf970f 100644 --- a/src/ScalarMessaging.ts +++ b/src/ScalarMessaging.ts @@ -291,9 +291,8 @@ Response: */ -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { IContent, MatrixEvent, IEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { IEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "./MatrixClientPeg"; import dis from "./dispatcher/dispatcher"; diff --git a/src/SendHistoryManager.ts b/src/SendHistoryManager.ts index e95641d4c9..32d6056a81 100644 --- a/src/SendHistoryManager.ts +++ b/src/SendHistoryManager.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { clamp } from "lodash"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { SerializedPart } from "./editor/parts"; diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 0770ae18a1..f97026a3f5 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -22,7 +22,7 @@ import { User } from "matrix-js-sdk/src/models/user"; import { Direction } from "matrix-js-sdk/src/models/event-timeline"; import * as ContentHelpers from "matrix-js-sdk/src/content-helpers"; import { logger } from "matrix-js-sdk/src/logger"; -import { IContent } from "matrix-js-sdk/src/models/event"; +import { IContent } from "matrix-js-sdk/src/matrix"; import { MRoomTopicEventContent } from "matrix-js-sdk/src/@types/topic"; import dis from "./dispatcher/dispatcher"; diff --git a/src/TextForEvent.tsx b/src/TextForEvent.tsx index 0018ca2ff8..cf9a59f352 100644 --- a/src/TextForEvent.tsx +++ b/src/TextForEvent.tsx @@ -15,14 +15,13 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { removeDirectionOverrideChars } from "matrix-js-sdk/src/utils"; import { GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/@types/partials"; import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; import { M_POLL_START, M_POLL_END } from "matrix-js-sdk/src/@types/polls"; import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { _t } from "./languageHandler"; import * as Roles from "./Roles"; diff --git a/src/audio/PlaybackClock.ts b/src/audio/PlaybackClock.ts index 6775c09fca..051064f836 100644 --- a/src/audio/PlaybackClock.ts +++ b/src/audio/PlaybackClock.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { SimpleObservable } from "matrix-widget-api"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IDestroyable } from "../utils/IDestroyable"; diff --git a/src/autocomplete/UserProvider.tsx b/src/autocomplete/UserProvider.tsx index c81695e42d..00d4d81502 100644 --- a/src/autocomplete/UserProvider.tsx +++ b/src/autocomplete/UserProvider.tsx @@ -19,8 +19,7 @@ limitations under the License. import React from "react"; import { sortBy } from "lodash"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomEvent, RoomMember, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room, RoomEvent, RoomMember, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set"; import { MatrixClientPeg } from "../MatrixClientPeg"; diff --git a/src/components/structures/FilePanel.tsx b/src/components/structures/FilePanel.tsx index d9ebb1de9f..1b7241f752 100644 --- a/src/components/structures/FilePanel.tsx +++ b/src/components/structures/FilePanel.tsx @@ -19,8 +19,7 @@ import React, { createRef } from "react"; import { Filter } from "matrix-js-sdk/src/filter"; import { EventTimelineSet, IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set"; import { Direction } from "matrix-js-sdk/src/models/event-timeline"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, MatrixEventEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { TimelineWindow } from "matrix-js-sdk/src/timeline-window"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/structures/LegacyCallEventGrouper.ts b/src/components/structures/LegacyCallEventGrouper.ts index 467b579410..e5942fea27 100644 --- a/src/components/structures/LegacyCallEventGrouper.ts +++ b/src/components/structures/LegacyCallEventGrouper.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { EventType } from "matrix-js-sdk/src/@types/event"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { CallEvent, CallState, CallType, MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import { EventEmitter } from "events"; diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx index b86a6d44e8..185b1ee005 100644 --- a/src/components/structures/LoggedInView.tsx +++ b/src/components/structures/LoggedInView.tsx @@ -16,12 +16,11 @@ limitations under the License. import React, { ClipboardEvent } from "react"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, RoomStateEvent, MatrixError } from "matrix-js-sdk/src/matrix"; import { MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import classNames from "classnames"; import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync"; import { IUsageLimit } from "matrix-js-sdk/src/@types/partials"; -import { RoomStateEvent, MatrixError } from "matrix-js-sdk/src/matrix"; import { isOnlyCtrlOrCmdKeyEvent, Key } from "../../Keyboard"; import PageTypes from "../../PageTypes"; diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index cbe92910eb..64470b6e04 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -22,10 +22,10 @@ import { HttpApiEvent, MatrixClient, MatrixEventEvent, + MatrixEvent, } from "matrix-js-sdk/src/matrix"; import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync"; import { InvalidStoreError } from "matrix-js-sdk/src/errors"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { defer, IDeferred, QueryDict } from "matrix-js-sdk/src/utils"; import { logger } from "matrix-js-sdk/src/logger"; import { throttle } from "lodash"; diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index 3c1880031a..e624106182 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -17,9 +17,8 @@ limitations under the License. import React, { createRef, ReactNode, TransitionEvent } from "react"; import ReactDOM from "react-dom"; import classNames from "classnames"; -import { Room, MatrixClient, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixClient, RoomStateEvent, EventStatus, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { logger } from "matrix-js-sdk/src/logger"; import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon"; import { isSupportedReceiptType } from "matrix-js-sdk/src/utils"; diff --git a/src/components/structures/RightPanel.tsx b/src/components/structures/RightPanel.tsx index 5b2482890d..fa4269b312 100644 --- a/src/components/structures/RightPanel.tsx +++ b/src/components/structures/RightPanel.tsx @@ -16,8 +16,7 @@ limitations under the License. */ import React from "react"; -import { Room, RoomState, RoomStateEvent, RoomMember } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomState, RoomStateEvent, RoomMember, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { throttle } from "lodash"; import dis from "../../dispatcher/dispatcher"; diff --git a/src/components/structures/RoomSearchView.tsx b/src/components/structures/RoomSearchView.tsx index d2769a8264..a08071eb02 100644 --- a/src/components/structures/RoomSearchView.tsx +++ b/src/components/structures/RoomSearchView.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from "react"; import { ISearchResults } from "matrix-js-sdk/src/@types/search"; -import { IThreadBundledRelationship, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { IThreadBundledRelationship, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/structures/RoomStatusBar.tsx b/src/components/structures/RoomStatusBar.tsx index 68d1c03ae3..8ff18eba36 100644 --- a/src/components/structures/RoomStatusBar.tsx +++ b/src/components/structures/RoomStatusBar.tsx @@ -15,9 +15,8 @@ limitations under the License. */ import React, { ReactNode } from "react"; -import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { EventStatus, MatrixEvent, Room, MatrixError } from "matrix-js-sdk/src/matrix"; import { SyncState, ISyncStateData } from "matrix-js-sdk/src/sync"; -import { Room, MatrixError } from "matrix-js-sdk/src/matrix"; import { Icon as WarningIcon } from "../../../res/img/feather-customised/warning-triangle.svg"; import { _t, _td } from "../../languageHandler"; diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 156264063c..8d570f2764 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -26,8 +26,9 @@ import { RoomEvent, RoomState, RoomStateEvent, + MatrixEvent, + MatrixEventEvent, } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; import { logger } from "matrix-js-sdk/src/logger"; import { EventTimeline } from "matrix-js-sdk/src/models/event-timeline"; import { EventType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index dfc7377e3c..8cc58e08c0 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { createRef, KeyboardEvent } from "react"; import { Thread, THREAD_RELATION_TYPE, ThreadEvent } from "matrix-js-sdk/src/models/thread"; -import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; -import { IEventRelation, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomEvent, IEventRelation, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import classNames from "classnames"; diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index dad80c4cef..8ad444a7b4 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { createRef, ReactNode } from "react"; import ReactDOM from "react-dom"; -import { Room, RoomEvent, RoomMember, RoomMemberEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomEvent, RoomMember, RoomMemberEvent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import { EventTimelineSet, IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set"; import { Direction, EventTimeline } from "matrix-js-sdk/src/models/event-timeline"; import { TimelineWindow } from "matrix-js-sdk/src/timeline-window"; diff --git a/src/components/structures/UserView.tsx b/src/components/structures/UserView.tsx index 3b76572e2f..6064d6b4af 100644 --- a/src/components/structures/UserView.tsx +++ b/src/components/structures/UserView.tsx @@ -16,8 +16,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { RoomMember, MatrixClient } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, RoomMember, MatrixClient } from "matrix-js-sdk/src/matrix"; import Modal from "../../Modal"; import { _t } from "../../languageHandler"; diff --git a/src/components/structures/ViewSource.tsx b/src/components/structures/ViewSource.tsx index d1e60ad12f..8b5ee7cc48 100644 --- a/src/components/structures/ViewSource.tsx +++ b/src/components/structures/ViewSource.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import SyntaxHighlight from "../views/elements/SyntaxHighlight"; import { _t } from "../../languageHandler"; diff --git a/src/components/views/avatars/DecoratedRoomAvatar.tsx b/src/components/views/avatars/DecoratedRoomAvatar.tsx index 5956200ad4..af5b866b95 100644 --- a/src/components/views/avatars/DecoratedRoomAvatar.tsx +++ b/src/components/views/avatars/DecoratedRoomAvatar.tsx @@ -16,9 +16,8 @@ limitations under the License. import React from "react"; import classNames from "classnames"; -import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; +import { Room, RoomEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { User, UserEvent } from "matrix-js-sdk/src/models/user"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; import { UnstableValue } from "matrix-js-sdk/src/NamespacedValue"; diff --git a/src/components/views/avatars/RoomAvatar.tsx b/src/components/views/avatars/RoomAvatar.tsx index 44232277a7..c9cbc8df1d 100644 --- a/src/components/views/avatars/RoomAvatar.tsx +++ b/src/components/views/avatars/RoomAvatar.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { ComponentProps } from "react"; -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/context_menus/MessageContextMenu.tsx b/src/components/views/context_menus/MessageContextMenu.tsx index 7b14509bb9..afc9b9864f 100644 --- a/src/components/views/context_menus/MessageContextMenu.tsx +++ b/src/components/views/context_menus/MessageContextMenu.tsx @@ -17,10 +17,9 @@ limitations under the License. */ import React, { createRef, useContext } from "react"; -import { EventStatus, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { EventStatus, MatrixEvent, MatrixEventEvent, RoomMemberEvent } from "matrix-js-sdk/src/matrix"; import { EventType, RelationType } from "matrix-js-sdk/src/@types/event"; import { Relations } from "matrix-js-sdk/src/models/relations"; -import { RoomMemberEvent } from "matrix-js-sdk/src/matrix"; import { M_POLL_START } from "matrix-js-sdk/src/@types/polls"; import { Thread } from "matrix-js-sdk/src/models/thread"; diff --git a/src/components/views/dialogs/BulkRedactDialog.tsx b/src/components/views/dialogs/BulkRedactDialog.tsx index 0b57265141..f4a5c016af 100644 --- a/src/components/views/dialogs/BulkRedactDialog.tsx +++ b/src/components/views/dialogs/BulkRedactDialog.tsx @@ -17,10 +17,9 @@ limitations under the License. import React, { useState } from "react"; import { logger } from "matrix-js-sdk/src/logger"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { RoomMember, Room } from "matrix-js-sdk/src/matrix"; +import { RoomMember, Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventTimeline } from "matrix-js-sdk/src/models/event-timeline"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { _t } from "../../../languageHandler"; import dis from "../../../dispatcher/dispatcher"; diff --git a/src/components/views/dialogs/ConfirmAndWaitRedactDialog.tsx b/src/components/views/dialogs/ConfirmAndWaitRedactDialog.tsx index 40395b9787..1a58a220cb 100644 --- a/src/components/views/dialogs/ConfirmAndWaitRedactDialog.tsx +++ b/src/components/views/dialogs/ConfirmAndWaitRedactDialog.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { HTTPError, MatrixError } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, HTTPError, MatrixError } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import ConfirmRedactDialog from "./ConfirmRedactDialog"; diff --git a/src/components/views/dialogs/EndPollDialog.tsx b/src/components/views/dialogs/EndPollDialog.tsx index 0d4a66dfe7..4f77c13417 100644 --- a/src/components/views/dialogs/EndPollDialog.tsx +++ b/src/components/views/dialogs/EndPollDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { PollEndEvent } from "matrix-js-sdk/src/extensible_events_v1/PollEndEvent"; diff --git a/src/components/views/dialogs/ForwardDialog.tsx b/src/components/views/dialogs/ForwardDialog.tsx index 1eabbdef45..44d2b08d91 100644 --- a/src/components/views/dialogs/ForwardDialog.tsx +++ b/src/components/views/dialogs/ForwardDialog.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { useEffect, useMemo, useState } from "react"; import classnames from "classnames"; -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomMember } from "matrix-js-sdk/src/matrix"; +import { IContent, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { ILocationContent, LocationAssetType, M_TIMESTAMP } from "matrix-js-sdk/src/@types/location"; diff --git a/src/components/views/dialogs/MessageEditHistoryDialog.tsx b/src/components/views/dialogs/MessageEditHistoryDialog.tsx index 58e7ba9b18..aac78fe6a7 100644 --- a/src/components/views/dialogs/MessageEditHistoryDialog.tsx +++ b/src/components/views/dialogs/MessageEditHistoryDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType, RelationType } from "matrix-js-sdk/src/@types/event"; import { defer } from "matrix-js-sdk/src/utils"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/dialogs/ReportEventDialog.tsx b/src/components/views/dialogs/ReportEventDialog.tsx index f5912131b5..41a24f01bd 100644 --- a/src/components/views/dialogs/ReportEventDialog.tsx +++ b/src/components/views/dialogs/ReportEventDialog.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { ChangeEvent } from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { _t, UserFriendlyError } from "../../../languageHandler"; diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index e4ac709d43..c93d62ce40 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -16,9 +16,8 @@ limitations under the License. */ import * as React from "react"; -import { Room, RoomMember } from "matrix-js-sdk/src/matrix"; +import { Room, RoomMember, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { User } from "matrix-js-sdk/src/models/user"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { _t } from "../../../languageHandler"; import QRCode from "../elements/QRCode"; diff --git a/src/components/views/dialogs/devtools/AccountData.tsx b/src/components/views/dialogs/devtools/AccountData.tsx index add23d345e..b5766ad1e2 100644 --- a/src/components/views/dialogs/devtools/AccountData.tsx +++ b/src/components/views/dialogs/devtools/AccountData.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { useContext, useMemo, useState } from "react"; -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { IContent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import BaseTool, { DevtoolsContext, IDevtoolsProps } from "./BaseTool"; import MatrixClientContext from "../../../../contexts/MatrixClientContext"; diff --git a/src/components/views/dialogs/devtools/Event.tsx b/src/components/views/dialogs/devtools/Event.tsx index 30f0abaf0f..16d76752eb 100644 --- a/src/components/views/dialogs/devtools/Event.tsx +++ b/src/components/views/dialogs/devtools/Event.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { ChangeEvent, ReactNode, useContext, useMemo, useRef, useState } from "react"; -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { IContent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { _t, _td } from "../../../../languageHandler"; import Field from "../../elements/Field"; diff --git a/src/components/views/dialogs/devtools/RoomState.tsx b/src/components/views/dialogs/devtools/RoomState.tsx index b83d977248..e84799c513 100644 --- a/src/components/views/dialogs/devtools/RoomState.tsx +++ b/src/components/views/dialogs/devtools/RoomState.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { useContext, useEffect, useMemo, useState } from "react"; -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { IContent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import { _t } from "../../../../languageHandler"; diff --git a/src/components/views/dialogs/devtools/WidgetExplorer.tsx b/src/components/views/dialogs/devtools/WidgetExplorer.tsx index 16621b97a6..018bd8a510 100644 --- a/src/components/views/dialogs/devtools/WidgetExplorer.tsx +++ b/src/components/views/dialogs/devtools/WidgetExplorer.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { useContext, useState } from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { useEventEmitterState } from "../../../../hooks/useEventEmitter"; import { _t } from "../../../../languageHandler"; diff --git a/src/components/views/elements/EventListSummary.tsx b/src/components/views/elements/EventListSummary.tsx index 24b4417f8a..ffe3c8d993 100644 --- a/src/components/views/elements/EventListSummary.tsx +++ b/src/components/views/elements/EventListSummary.tsx @@ -17,8 +17,7 @@ limitations under the License. */ import React, { ComponentProps, ReactNode } from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { RoomMember } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/elements/EventTilePreview.tsx b/src/components/views/elements/EventTilePreview.tsx index 7476a3b52f..662523f65d 100644 --- a/src/components/views/elements/EventTilePreview.tsx +++ b/src/components/views/elements/EventTilePreview.tsx @@ -16,8 +16,7 @@ limitations under the License. import React from "react"; import classnames from "classnames"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { RoomMember } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix"; import { MsgType } from "matrix-js-sdk/src/@types/event"; import * as Avatar from "../../../Avatar"; diff --git a/src/components/views/elements/GenericEventListSummary.tsx b/src/components/views/elements/GenericEventListSummary.tsx index 4fd4ff8225..f9668c2ca4 100644 --- a/src/components/views/elements/GenericEventListSummary.tsx +++ b/src/components/views/elements/GenericEventListSummary.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { ReactNode, useEffect } from "react"; import { uniqBy } from "lodash"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { RoomMember } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import MemberAvatar from "../avatars/MemberAvatar"; diff --git a/src/components/views/elements/ImageView.tsx b/src/components/views/elements/ImageView.tsx index cd339eadee..7162d7ad80 100644 --- a/src/components/views/elements/ImageView.tsx +++ b/src/components/views/elements/ImageView.tsx @@ -18,7 +18,7 @@ limitations under the License. import React, { createRef, CSSProperties } from "react"; import FocusLock from "react-focus-lock"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import AccessibleTooltipButton from "./AccessibleTooltipButton"; diff --git a/src/components/views/elements/PollCreateDialog.tsx b/src/components/views/elements/PollCreateDialog.tsx index 6127dbc8e1..cbd548944e 100644 --- a/src/components/views/elements/PollCreateDialog.tsx +++ b/src/components/views/elements/PollCreateDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ChangeEvent, createRef } from "react"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { KnownPollKind, M_POLL_KIND_DISCLOSED, @@ -23,7 +23,6 @@ import { M_POLL_START, } from "matrix-js-sdk/src/@types/polls"; import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { IPartialEvent } from "matrix-js-sdk/src/@types/extensible_events"; import ScrollableBaseModal, { IScrollableBaseState } from "../dialogs/ScrollableBaseModal"; diff --git a/src/components/views/elements/ReplyChain.tsx b/src/components/views/elements/ReplyChain.tsx index ea2f566e18..10fdfdba2f 100644 --- a/src/components/views/elements/ReplyChain.tsx +++ b/src/components/views/elements/ReplyChain.tsx @@ -17,8 +17,7 @@ limitations under the License. import React from "react"; import classNames from "classnames"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/emojipicker/ReactionPicker.tsx b/src/components/views/emojipicker/ReactionPicker.tsx index b479b446e2..c877dc5f7e 100644 --- a/src/components/views/emojipicker/ReactionPicker.tsx +++ b/src/components/views/emojipicker/ReactionPicker.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Relations, RelationsEvent } from "matrix-js-sdk/src/models/relations"; import { EventType, RelationType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/location/LocationButton.tsx b/src/components/views/location/LocationButton.tsx index 127a9198c2..ecf03cc15d 100644 --- a/src/components/views/location/LocationButton.tsx +++ b/src/components/views/location/LocationButton.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { ReactNode, SyntheticEvent, useContext } from "react"; import classNames from "classnames"; -import { RoomMember } from "matrix-js-sdk/src/matrix"; -import { IEventRelation } from "matrix-js-sdk/src/models/event"; +import { RoomMember, IEventRelation } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import { CollapsibleButton } from "../rooms/CollapsibleButton"; diff --git a/src/components/views/location/LocationShareMenu.tsx b/src/components/views/location/LocationShareMenu.tsx index 8cc3364f24..036e2e1fe0 100644 --- a/src/components/views/location/LocationShareMenu.tsx +++ b/src/components/views/location/LocationShareMenu.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { SyntheticEvent, useContext, useState } from "react"; -import { Room } from "matrix-js-sdk/src/matrix"; -import { IEventRelation } from "matrix-js-sdk/src/models/event"; +import { Room, IEventRelation } from "matrix-js-sdk/src/matrix"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import ContextMenu, { MenuProps } from "../../structures/ContextMenu"; diff --git a/src/components/views/location/LocationViewDialog.tsx b/src/components/views/location/LocationViewDialog.tsx index 049c4a89a7..48222c0e34 100644 --- a/src/components/views/location/LocationViewDialog.tsx +++ b/src/components/views/location/LocationViewDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import BaseDialog from "../dialogs/BaseDialog"; diff --git a/src/components/views/location/shareLocation.ts b/src/components/views/location/shareLocation.ts index 808ef6e4ca..4209a7ab78 100644 --- a/src/components/views/location/shareLocation.ts +++ b/src/components/views/location/shareLocation.ts @@ -15,11 +15,10 @@ limitations under the License. */ import { MatrixClient } from "matrix-js-sdk/src/client"; -import { IContent } from "matrix-js-sdk/src/matrix"; +import { IContent, IEventRelation } from "matrix-js-sdk/src/matrix"; import { MatrixError } from "matrix-js-sdk/src/http-api"; import { makeLocationContent, makeBeaconInfoContent } from "matrix-js-sdk/src/content-helpers"; import { logger } from "matrix-js-sdk/src/logger"; -import { IEventRelation } from "matrix-js-sdk/src/models/event"; import { LocationAssetType } from "matrix-js-sdk/src/@types/location"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; diff --git a/src/components/views/messages/CallEvent.tsx b/src/components/views/messages/CallEvent.tsx index ee65bf2687..067bffce30 100644 --- a/src/components/views/messages/CallEvent.tsx +++ b/src/components/views/messages/CallEvent.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { forwardRef, useCallback, useContext, useMemo } from "react"; -import type { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import type { RoomMember } from "matrix-js-sdk/src/matrix"; +import type { MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix"; import { ConnectionState, ElementCall } from "../../../models/Call"; import { _t } from "../../../languageHandler"; import { diff --git a/src/components/views/messages/EditHistoryMessage.tsx b/src/components/views/messages/EditHistoryMessage.tsx index 6c06321e69..e11c4ddded 100644 --- a/src/components/views/messages/EditHistoryMessage.tsx +++ b/src/components/views/messages/EditHistoryMessage.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { createRef } from "react"; -import { EventStatus, IContent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { EventStatus, IContent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import { MsgType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/messages/EncryptionEvent.tsx b/src/components/views/messages/EncryptionEvent.tsx index 2bbb0563c0..bcd6136ec9 100644 --- a/src/components/views/messages/EncryptionEvent.tsx +++ b/src/components/views/messages/EncryptionEvent.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { forwardRef, useContext } from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IRoomEncryption } from "matrix-js-sdk/src/crypto/RoomList"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/messages/HiddenBody.tsx b/src/components/views/messages/HiddenBody.tsx index 965cb38bce..108898e0da 100644 --- a/src/components/views/messages/HiddenBody.tsx +++ b/src/components/views/messages/HiddenBody.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import { IBodyProps } from "./IBodyProps"; diff --git a/src/components/views/messages/IBodyProps.ts b/src/components/views/messages/IBodyProps.ts index b9ec41df8e..fcc204dae3 100644 --- a/src/components/views/messages/IBodyProps.ts +++ b/src/components/views/messages/IBodyProps.ts @@ -15,7 +15,7 @@ limitations under the License. */ import React, { LegacyRef } from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MediaEventHelper } from "../../../utils/MediaEventHelper"; import EditorStateTransfer from "../../../utils/EditorStateTransfer"; diff --git a/src/components/views/messages/LegacyCallEvent.tsx b/src/components/views/messages/LegacyCallEvent.tsx index 07337c7874..9516d03577 100644 --- a/src/components/views/messages/LegacyCallEvent.tsx +++ b/src/components/views/messages/LegacyCallEvent.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { createRef } from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { CallErrorCode, CallState } from "matrix-js-sdk/src/webrtc/call"; import classNames from "classnames"; diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx index e71a468143..474706d4cc 100644 --- a/src/components/views/messages/MJitsiWidgetEvent.tsx +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import WidgetStore from "../../../stores/WidgetStore"; diff --git a/src/components/views/messages/MKeyVerificationConclusion.tsx b/src/components/views/messages/MKeyVerificationConclusion.tsx index 4ec24231dc..211812051d 100644 --- a/src/components/views/messages/MKeyVerificationConclusion.tsx +++ b/src/components/views/messages/MKeyVerificationConclusion.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import classNames from "classnames"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { VerificationPhase, VerificationRequest, VerificationRequestEvent } from "matrix-js-sdk/src/crypto-api"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { CryptoEvent } from "matrix-js-sdk/src/crypto"; diff --git a/src/components/views/messages/MLocationBody.tsx b/src/components/views/messages/MLocationBody.tsx index 2932d361b8..05b3270ca2 100644 --- a/src/components/views/messages/MLocationBody.tsx +++ b/src/components/views/messages/MLocationBody.tsx @@ -15,9 +15,8 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, ClientEvent, ClientEventHandlerMap } from "matrix-js-sdk/src/matrix"; import { randomString } from "matrix-js-sdk/src/randomstring"; -import { ClientEvent, ClientEventHandlerMap } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import Modal from "../../../Modal"; diff --git a/src/components/views/messages/MPollBody.tsx b/src/components/views/messages/MPollBody.tsx index 5a5c1b5315..770b725a66 100644 --- a/src/components/views/messages/MPollBody.tsx +++ b/src/components/views/messages/MPollBody.tsx @@ -16,9 +16,8 @@ limitations under the License. import React, { ReactNode } from "react"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { Relations } from "matrix-js-sdk/src/models/relations"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { M_POLL_KIND_DISCLOSED, M_POLL_RESPONSE, M_POLL_START } from "matrix-js-sdk/src/@types/polls"; import { RelatedRelations } from "matrix-js-sdk/src/models/related-relations"; import { PollStartEvent, PollAnswerSubevent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent"; diff --git a/src/components/views/messages/MessageActionBar.tsx b/src/components/views/messages/MessageActionBar.tsx index 5bf600c02e..5f176e7cec 100644 --- a/src/components/views/messages/MessageActionBar.tsx +++ b/src/components/views/messages/MessageActionBar.tsx @@ -17,7 +17,7 @@ limitations under the License. */ import React, { ReactElement, useCallback, useContext, useEffect } from "react"; -import { EventStatus, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { EventStatus, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import { MsgType, RelationType } from "matrix-js-sdk/src/@types/event"; import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon"; diff --git a/src/components/views/messages/MessageEvent.tsx b/src/components/views/messages/MessageEvent.tsx index 9e974a02a3..57fc96e32a 100644 --- a/src/components/views/messages/MessageEvent.tsx +++ b/src/components/views/messages/MessageEvent.tsx @@ -19,7 +19,7 @@ import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon"; import { M_LOCATION } from "matrix-js-sdk/src/@types/location"; import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls"; -import { MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import SettingsStore from "../../../settings/SettingsStore"; import { Mjolnir } from "../../../mjolnir/Mjolnir"; diff --git a/src/components/views/messages/ReactionsRow.tsx b/src/components/views/messages/ReactionsRow.tsx index cb1f7ab0f4..f1049e6746 100644 --- a/src/components/views/messages/ReactionsRow.tsx +++ b/src/components/views/messages/ReactionsRow.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { SyntheticEvent } from "react"; import classNames from "classnames"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import { Relations, RelationsEvent } from "matrix-js-sdk/src/models/relations"; import { uniqBy } from "lodash"; diff --git a/src/components/views/messages/ReactionsRowButton.tsx b/src/components/views/messages/ReactionsRowButton.tsx index e89bcb4cda..91e1d24773 100644 --- a/src/components/views/messages/ReactionsRowButton.tsx +++ b/src/components/views/messages/ReactionsRowButton.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import classNames from "classnames"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import { formatCommaSeparatedList } from "../../../utils/FormattingUtils"; diff --git a/src/components/views/messages/ReactionsRowButtonTooltip.tsx b/src/components/views/messages/ReactionsRowButtonTooltip.tsx index 22dfaf08b8..04cfe1dc58 100644 --- a/src/components/views/messages/ReactionsRowButtonTooltip.tsx +++ b/src/components/views/messages/ReactionsRowButtonTooltip.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { unicodeToShortcode } from "../../../HtmlUtils"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/messages/RoomAvatarEvent.tsx b/src/components/views/messages/RoomAvatarEvent.tsx index 777e672ddb..067dfbc737 100644 --- a/src/components/views/messages/RoomAvatarEvent.tsx +++ b/src/components/views/messages/RoomAvatarEvent.tsx @@ -17,7 +17,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/messages/RoomPredecessorTile.tsx b/src/components/views/messages/RoomPredecessorTile.tsx index 67be715634..2275bcbcca 100644 --- a/src/components/views/messages/RoomPredecessorTile.tsx +++ b/src/components/views/messages/RoomPredecessorTile.tsx @@ -17,8 +17,7 @@ limitations under the License. import React, { useCallback, useContext } from "react"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import dis from "../../../dispatcher/dispatcher"; import { Action } from "../../../dispatcher/actions"; diff --git a/src/components/views/messages/SenderProfile.tsx b/src/components/views/messages/SenderProfile.tsx index ae82f40404..c86e8e8f86 100644 --- a/src/components/views/messages/SenderProfile.tsx +++ b/src/components/views/messages/SenderProfile.tsx @@ -16,7 +16,7 @@ */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MsgType } from "matrix-js-sdk/src/@types/event"; import DisambiguatedProfile from "./DisambiguatedProfile"; diff --git a/src/components/views/messages/TextualEvent.tsx b/src/components/views/messages/TextualEvent.tsx index fa82c3bf31..ae94fd31f9 100644 --- a/src/components/views/messages/TextualEvent.tsx +++ b/src/components/views/messages/TextualEvent.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import RoomContext from "../../../contexts/RoomContext"; import * as TextForEvent from "../../../TextForEvent"; diff --git a/src/components/views/messages/TileErrorBoundary.tsx b/src/components/views/messages/TileErrorBoundary.tsx index d87798a8e6..703501351c 100644 --- a/src/components/views/messages/TileErrorBoundary.tsx +++ b/src/components/views/messages/TileErrorBoundary.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { ReactNode } from "react"; import classNames from "classnames"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import Modal from "../../../Modal"; diff --git a/src/components/views/right_panel/PinnedMessagesCard.tsx b/src/components/views/right_panel/PinnedMessagesCard.tsx index 02a04b2385..564f0197e1 100644 --- a/src/components/views/right_panel/PinnedMessagesCard.tsx +++ b/src/components/views/right_panel/PinnedMessagesCard.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { useCallback, useContext, useEffect, useState } from "react"; -import { Room, RoomEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomEvent, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType, RelationType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/right_panel/TimelineCard.tsx b/src/components/views/right_panel/TimelineCard.tsx index 9264328708..6a4c719898 100644 --- a/src/components/views/right_panel/TimelineCard.tsx +++ b/src/components/views/right_panel/TimelineCard.tsx @@ -15,9 +15,8 @@ limitations under the License. */ import React from "react"; -import { IEventRelation, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { IEventRelation, MatrixEvent, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { EventTimelineSet } from "matrix-js-sdk/src/models/event-timeline-set"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { Thread } from "matrix-js-sdk/src/models/thread"; import BaseCard from "./BaseCard"; diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index 5f9307649a..abf143d2f1 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -20,9 +20,8 @@ limitations under the License. import React, { ReactNode, useCallback, useContext, useEffect, useMemo, useState } from "react"; import classNames from "classnames"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { RoomMember, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { RoomMember, Room, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { User } from "matrix-js-sdk/src/models/user"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { VerificationRequest } from "matrix-js-sdk/src/crypto-api"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/room_settings/AliasSettings.tsx b/src/components/views/room_settings/AliasSettings.tsx index ab92feca76..cbf701b38b 100644 --- a/src/components/views/room_settings/AliasSettings.tsx +++ b/src/components/views/room_settings/AliasSettings.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ChangeEvent, ContextType, createRef, SyntheticEvent } from "react"; -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { IContent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { EventType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/rooms/AuxPanel.tsx b/src/components/views/rooms/AuxPanel.tsx index 00d82a70ab..b1b04581ed 100644 --- a/src/components/views/rooms/AuxPanel.tsx +++ b/src/components/views/rooms/AuxPanel.tsx @@ -16,9 +16,8 @@ limitations under the License. import React, { ReactNode } from "react"; import { lexicographicCompare } from "matrix-js-sdk/src/utils"; -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { Room, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { throttle } from "lodash"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import AppsDrawer from "./AppsDrawer"; diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index 317efacd48..e14aa9dc29 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -16,8 +16,7 @@ limitations under the License. import classNames from "classnames"; import React, { createRef, ClipboardEvent, SyntheticEvent } from "react"; -import { Room } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import EMOTICON_REGEX from "emojibase-regex/emoticon"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/rooms/EditMessageComposer.tsx b/src/components/views/rooms/EditMessageComposer.tsx index 3ed02f6286..b13349ea15 100644 --- a/src/components/views/rooms/EditMessageComposer.tsx +++ b/src/components/views/rooms/EditMessageComposer.tsx @@ -16,9 +16,8 @@ limitations under the License. import React, { createRef, KeyboardEvent } from "react"; import classNames from "classnames"; -import { EventStatus, IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { EventStatus, IContent, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { MsgType } from "matrix-js-sdk/src/@types/event"; -import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer"; diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 386c57f304..67bed8875b 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -18,9 +18,16 @@ limitations under the License. import React, { createRef, forwardRef, MouseEvent, ReactNode, useRef } from "react"; import classNames from "classnames"; import { EventType, MsgType, RelationType } from "matrix-js-sdk/src/@types/event"; -import { EventStatus, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { + EventStatus, + MatrixEvent, + MatrixEventEvent, + RoomMember, + NotificationCountType, + Room, + RoomEvent, +} from "matrix-js-sdk/src/matrix"; import { Relations } from "matrix-js-sdk/src/models/relations"; -import { RoomMember, NotificationCountType, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread"; import { logger } from "matrix-js-sdk/src/logger"; import { CallErrorCode } from "matrix-js-sdk/src/webrtc/call"; diff --git a/src/components/views/rooms/LegacyRoomHeader.tsx b/src/components/views/rooms/LegacyRoomHeader.tsx index c833e60f31..315332fd8c 100644 --- a/src/components/views/rooms/LegacyRoomHeader.tsx +++ b/src/components/views/rooms/LegacyRoomHeader.tsx @@ -22,8 +22,7 @@ import { RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { CallType } from "matrix-js-sdk/src/webrtc/call"; import { ISearchResults } from "matrix-js-sdk/src/@types/search"; -import type { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import type { Room } from "matrix-js-sdk/src/matrix"; +import type { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import defaultDispatcher from "../../../dispatcher/dispatcher"; import { Action } from "../../../dispatcher/actions"; diff --git a/src/components/views/rooms/LinkPreviewGroup.tsx b/src/components/views/rooms/LinkPreviewGroup.tsx index a51903ef59..dc0451b6a1 100644 --- a/src/components/views/rooms/LinkPreviewGroup.tsx +++ b/src/components/views/rooms/LinkPreviewGroup.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import React, { useContext, useEffect } from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, MatrixError } from "matrix-js-sdk/src/matrix"; import { IPreviewUrlResponse, MatrixClient } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixError } from "matrix-js-sdk/src/matrix"; import { useStateToggle } from "../../../hooks/useStateToggle"; import LinkPreviewWidget from "./LinkPreviewWidget"; diff --git a/src/components/views/rooms/LinkPreviewWidget.tsx b/src/components/views/rooms/LinkPreviewWidget.tsx index 5684d9b6fd..41cf4672f2 100644 --- a/src/components/views/rooms/LinkPreviewWidget.tsx +++ b/src/components/views/rooms/LinkPreviewWidget.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { ComponentProps, createRef, ReactNode } from "react"; import { decode } from "html-entities"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IPreviewUrlResponse } from "matrix-js-sdk/src/client"; import { Linkify } from "../../../HtmlUtils"; diff --git a/src/components/views/rooms/MemberList.tsx b/src/components/views/rooms/MemberList.tsx index fed1710eb3..a85652563b 100644 --- a/src/components/views/rooms/MemberList.tsx +++ b/src/components/views/rooms/MemberList.tsx @@ -18,8 +18,15 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomEvent, RoomMember, RoomMemberEvent, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { + MatrixEvent, + Room, + RoomEvent, + RoomMember, + RoomMemberEvent, + RoomState, + RoomStateEvent, +} from "matrix-js-sdk/src/matrix"; import { User, UserEvent } from "matrix-js-sdk/src/models/user"; import { throttle } from "lodash"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; diff --git a/src/components/views/rooms/MemberTile.tsx b/src/components/views/rooms/MemberTile.tsx index 4ae5b2bbfc..5bda938a38 100644 --- a/src/components/views/rooms/MemberTile.tsx +++ b/src/components/views/rooms/MemberTile.tsx @@ -16,8 +16,7 @@ limitations under the License. */ import React from "react"; -import { RoomMember, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { RoomMember, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo"; import { CryptoEvent } from "matrix-js-sdk/src/crypto"; diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx index 6667e2354e..2cfd1b8760 100644 --- a/src/components/views/rooms/MessageComposer.tsx +++ b/src/components/views/rooms/MessageComposer.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { createRef, ReactNode } from "react"; import classNames from "classnames"; -import { IEventRelation, MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomMember } from "matrix-js-sdk/src/matrix"; +import { IEventRelation, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { Optional } from "matrix-events-sdk"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; diff --git a/src/components/views/rooms/MessageComposerButtons.tsx b/src/components/views/rooms/MessageComposerButtons.tsx index 5df5768259..5766cb3093 100644 --- a/src/components/views/rooms/MessageComposerButtons.tsx +++ b/src/components/views/rooms/MessageComposerButtons.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import classNames from "classnames"; -import { IEventRelation } from "matrix-js-sdk/src/models/event"; +import { IEventRelation, Room } from "matrix-js-sdk/src/matrix"; import { M_POLL_START } from "matrix-js-sdk/src/@types/polls"; import React, { createContext, ReactElement, ReactNode, useContext, useRef } from "react"; -import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; diff --git a/src/components/views/rooms/PinnedEventTile.tsx b/src/components/views/rooms/PinnedEventTile.tsx index 6928641f62..03870de378 100644 --- a/src/components/views/rooms/PinnedEventTile.tsx +++ b/src/components/views/rooms/PinnedEventTile.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Relations } from "matrix-js-sdk/src/models/relations"; import { EventType, RelationType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/rooms/ReplyPreview.tsx b/src/components/views/rooms/ReplyPreview.tsx index 3bc540af11..f7534a8e52 100644 --- a/src/components/views/rooms/ReplyPreview.tsx +++ b/src/components/views/rooms/ReplyPreview.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import dis from "../../../dispatcher/dispatcher"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/rooms/ReplyTile.tsx b/src/components/views/rooms/ReplyTile.tsx index 7dacf2bfed..45c209c68c 100644 --- a/src/components/views/rooms/ReplyTile.tsx +++ b/src/components/views/rooms/ReplyTile.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { createRef } from "react"; import classNames from "classnames"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/rooms/RoomUpgradeWarningBar.tsx b/src/components/views/rooms/RoomUpgradeWarningBar.tsx index 55319f0121..a63dc26f27 100644 --- a/src/components/views/rooms/RoomUpgradeWarningBar.tsx +++ b/src/components/views/rooms/RoomUpgradeWarningBar.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import Modal from "../../../Modal"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/rooms/SearchResultTile.tsx b/src/components/views/rooms/SearchResultTile.tsx index c7366c6c14..99b5f0805c 100644 --- a/src/components/views/rooms/SearchResultTile.tsx +++ b/src/components/views/rooms/SearchResultTile.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import RoomContext, { TimelineRenderingType } from "../../../contexts/RoomContext"; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index d12e1d75b5..b97e014aef 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -16,11 +16,10 @@ limitations under the License. import React, { createRef, KeyboardEvent, SyntheticEvent } from "react"; import EMOJI_REGEX from "emojibase-regex"; -import { IContent, MatrixEvent, IEventRelation, IMentions } from "matrix-js-sdk/src/models/event"; +import { IContent, MatrixEvent, IEventRelation, IMentions, Room } from "matrix-js-sdk/src/matrix"; import { DebouncedFunc, throttle } from "lodash"; import { EventType, MsgType, RelationType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; -import { Room } from "matrix-js-sdk/src/matrix"; import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; diff --git a/src/components/views/rooms/ThirdPartyMemberInfo.tsx b/src/components/views/rooms/ThirdPartyMemberInfo.tsx index 481360526a..9b63109d09 100644 --- a/src/components/views/rooms/ThirdPartyMemberInfo.tsx +++ b/src/components/views/rooms/ThirdPartyMemberInfo.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { EventType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/rooms/ThreadSummary.tsx b/src/components/views/rooms/ThreadSummary.tsx index 717767d9a1..e589349317 100644 --- a/src/components/views/rooms/ThreadSummary.tsx +++ b/src/components/views/rooms/ThreadSummary.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { useContext, useState } from "react"; import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread"; -import { IContent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { IContent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import { CardContext } from "../right_panel/context"; diff --git a/src/components/views/rooms/VoiceRecordComposerTile.tsx b/src/components/views/rooms/VoiceRecordComposerTile.tsx index 0945c9ba7a..78043dc6a7 100644 --- a/src/components/views/rooms/VoiceRecordComposerTile.tsx +++ b/src/components/views/rooms/VoiceRecordComposerTile.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import React, { ReactNode } from "react"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, IEventRelation, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { Optional } from "matrix-events-sdk"; -import { IEventRelation, MatrixEvent } from "matrix-js-sdk/src/models/event"; import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/rooms/WhoIsTypingTile.tsx b/src/components/views/rooms/WhoIsTypingTile.tsx index c67dc9c1c9..95c14a25ef 100644 --- a/src/components/views/rooms/WhoIsTypingTile.tsx +++ b/src/components/views/rooms/WhoIsTypingTile.tsx @@ -16,8 +16,7 @@ limitations under the License. */ import React from "react"; -import { Room, RoomEvent, RoomMember, RoomMemberEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomEvent, RoomMember, RoomMemberEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { compare } from "matrix-js-sdk/src/utils"; import * as WhoIsTyping from "../../../WhoIsTyping"; diff --git a/src/components/views/rooms/wysiwyg_composer/SendWysiwygComposer.tsx b/src/components/views/rooms/wysiwyg_composer/SendWysiwygComposer.tsx index d5cc08e4f0..300032a4db 100644 --- a/src/components/views/rooms/wysiwyg_composer/SendWysiwygComposer.tsx +++ b/src/components/views/rooms/wysiwyg_composer/SendWysiwygComposer.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ForwardedRef, forwardRef, MutableRefObject, useRef } from "react"; -import { IEventRelation } from "matrix-js-sdk/src/models/event"; +import { IEventRelation } from "matrix-js-sdk/src/matrix"; import { useWysiwygSendActionHandler } from "./hooks/useWysiwygSendActionHandler"; import { WysiwygComposer } from "./components/WysiwygComposer"; diff --git a/src/components/views/rooms/wysiwyg_composer/utils/message.ts b/src/components/views/rooms/wysiwyg_composer/utils/message.ts index 8f4e619c2b..7e6f066497 100644 --- a/src/components/views/rooms/wysiwyg_composer/utils/message.ts +++ b/src/components/views/rooms/wysiwyg_composer/utils/message.ts @@ -15,8 +15,7 @@ limitations under the License. */ import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer"; -import { IContent, IEventRelation, MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { ISendEventResponse, MatrixClient } from "matrix-js-sdk/src/matrix"; +import { IContent, IEventRelation, MatrixEvent, ISendEventResponse, MatrixClient } from "matrix-js-sdk/src/matrix"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; import { PosthogAnalytics } from "../../../../../PosthogAnalytics"; diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 1642175b00..78c54b578e 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { ReactNode } from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx b/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx index be39d4065d..03c67604eb 100644 --- a/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { ReactNode } from "react"; -import { Room, MatrixClient } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../../../languageHandler"; import BridgeTile from "../../BridgeTile"; diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx index 454dd623b1..9359a2fb6b 100644 --- a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx @@ -16,11 +16,10 @@ limitations under the License. import React from "react"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { RoomMember, RoomState, RoomStateEvent, Room } from "matrix-js-sdk/src/matrix"; +import { RoomMember, RoomState, RoomStateEvent, Room, IContent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { throttle, get } from "lodash"; import { compare } from "matrix-js-sdk/src/utils"; -import { IContent } from "matrix-js-sdk/src/models/event"; import { _t, _td } from "../../../../../languageHandler"; import AccessibleButton from "../../../elements/AccessibleButton"; diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx index 259aca0b55..42189a860b 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { ReactNode } from "react"; import { GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/@types/partials"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { RoomStateEvent, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, RoomStateEvent, Room } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/dispatcher/payloads/ComposerInsertPayload.ts b/src/dispatcher/payloads/ComposerInsertPayload.ts index a54b614b7a..1adcdae05c 100644 --- a/src/dispatcher/payloads/ComposerInsertPayload.ts +++ b/src/dispatcher/payloads/ComposerInsertPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { ActionPayload } from "../payloads"; import { Action } from "../actions"; diff --git a/src/dispatcher/payloads/OpenForwardDialogPayload.ts b/src/dispatcher/payloads/OpenForwardDialogPayload.ts index 4a5a9b1c84..021199cc55 100644 --- a/src/dispatcher/payloads/OpenForwardDialogPayload.ts +++ b/src/dispatcher/payloads/OpenForwardDialogPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Optional } from "matrix-events-sdk"; import { Action } from "../actions"; diff --git a/src/dispatcher/payloads/OpenReportEventDialogPayload.ts b/src/dispatcher/payloads/OpenReportEventDialogPayload.ts index 1af103871d..996379faac 100644 --- a/src/dispatcher/payloads/OpenReportEventDialogPayload.ts +++ b/src/dispatcher/payloads/OpenReportEventDialogPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Action } from "../actions"; import { ActionPayload } from "../payloads"; diff --git a/src/dispatcher/payloads/ShowThreadPayload.ts b/src/dispatcher/payloads/ShowThreadPayload.ts index 254a33caa4..e1b8ac296c 100644 --- a/src/dispatcher/payloads/ShowThreadPayload.ts +++ b/src/dispatcher/payloads/ShowThreadPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { ActionPayload } from "../payloads"; import { Action } from "../actions"; diff --git a/src/dispatcher/payloads/ViewRoomPayload.ts b/src/dispatcher/payloads/ViewRoomPayload.ts index eacd94d37e..282204b458 100644 --- a/src/dispatcher/payloads/ViewRoomPayload.ts +++ b/src/dispatcher/payloads/ViewRoomPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { ViewRoom as ViewRoomEvent } from "@matrix-org/analytics-events/types/typescript/ViewRoom"; import { ActionPayload } from "../payloads"; diff --git a/src/editor/commands.tsx b/src/editor/commands.tsx index 91eeda23e1..979cba620f 100644 --- a/src/editor/commands.tsx +++ b/src/editor/commands.tsx @@ -16,8 +16,7 @@ limitations under the License. import React from "react"; import { logger } from "matrix-js-sdk/src/logger"; -import { IContent } from "matrix-js-sdk/src/models/event"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; +import { IContent, MatrixClient } from "matrix-js-sdk/src/matrix"; import EditorModel from "./model"; import { Type } from "./parts"; diff --git a/src/editor/deserialize.ts b/src/editor/deserialize.ts index d39199f124..89f72a22be 100644 --- a/src/editor/deserialize.ts +++ b/src/editor/deserialize.ts @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MsgType } from "matrix-js-sdk/src/@types/event"; import { checkBlockNode } from "../HtmlUtils"; diff --git a/src/effects/utils.ts b/src/effects/utils.ts index 559c8e04bb..32543b080c 100644 --- a/src/effects/utils.ts +++ b/src/effects/utils.ts @@ -15,7 +15,7 @@ limitations under the License. */ -import { IContent } from "matrix-js-sdk/src/models/event"; +import { IContent } from "matrix-js-sdk/src/matrix"; /** * Checks a message if it contains one of the provided emojis diff --git a/src/events/EventTileFactory.tsx b/src/events/EventTileFactory.tsx index bf92d5f73e..99b71eb1d9 100644 --- a/src/events/EventTileFactory.tsx +++ b/src/events/EventTileFactory.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType, MsgType, RelationType } from "matrix-js-sdk/src/@types/event"; import { Optional } from "matrix-events-sdk"; import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls"; diff --git a/src/hooks/room/useTopic.ts b/src/hooks/room/useTopic.ts index a80bb98c48..9750310ccf 100644 --- a/src/hooks/room/useTopic.ts +++ b/src/hooks/room/useTopic.ts @@ -16,8 +16,7 @@ limitations under the License. import { useEffect, useState } from "react"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { parseTopicContent, TopicState } from "matrix-js-sdk/src/content-helpers"; import { MRoomTopicEventContent } from "matrix-js-sdk/src/@types/topic"; import { Optional } from "matrix-events-sdk"; diff --git a/src/hooks/useAccountData.ts b/src/hooks/useAccountData.ts index 37fa3c6ea8..335513a506 100644 --- a/src/hooks/useAccountData.ts +++ b/src/hooks/useAccountData.ts @@ -16,8 +16,7 @@ limitations under the License. import { useCallback, useState } from "react"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { useTypedEventEmitter } from "./useEventEmitter"; diff --git a/src/hooks/useIsEncrypted.ts b/src/hooks/useIsEncrypted.ts index 432ba196e3..75fd5c9de9 100644 --- a/src/hooks/useIsEncrypted.ts +++ b/src/hooks/useIsEncrypted.ts @@ -16,8 +16,7 @@ limitations under the License. import { useCallback, useState } from "react"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { useTypedEventEmitter } from "./useEventEmitter"; diff --git a/src/indexing/EventIndex.ts b/src/indexing/EventIndex.ts index 3ef895fd37..fafdd95bf5 100644 --- a/src/indexing/EventIndex.ts +++ b/src/indexing/EventIndex.ts @@ -15,9 +15,8 @@ limitations under the License. */ import { EventEmitter } from "events"; -import { RoomMember, Room, RoomEvent, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { RoomMember, Room, RoomEvent, RoomState, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Direction, EventTimeline } from "matrix-js-sdk/src/models/event-timeline"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { EventTimelineSet, IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set"; import { TimelineIndex, TimelineWindow } from "matrix-js-sdk/src/timeline-window"; import { sleep } from "matrix-js-sdk/src/utils"; diff --git a/src/integrations/IntegrationManagers.ts b/src/integrations/IntegrationManagers.ts index 3464bbc20e..f3d0f951d7 100644 --- a/src/integrations/IntegrationManagers.ts +++ b/src/integrations/IntegrationManagers.ts @@ -18,7 +18,7 @@ import { logger } from "matrix-js-sdk/src/logger"; import { ClientEvent, IClientWellKnown, MatrixClient } from "matrix-js-sdk/src/client"; import { compare } from "matrix-js-sdk/src/utils"; -import type { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import type { MatrixEvent } from "matrix-js-sdk/src/matrix"; import SdkConfig from "../SdkConfig"; import Modal from "../Modal"; import { IntegrationManagerInstance, Kind } from "./IntegrationManagerInstance"; diff --git a/src/mjolnir/Mjolnir.ts b/src/mjolnir/Mjolnir.ts index 8e4c8b9666..ff60c0ec78 100644 --- a/src/mjolnir/Mjolnir.ts +++ b/src/mjolnir/Mjolnir.ts @@ -14,10 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { Preset } from "matrix-js-sdk/src/@types/partials"; import { logger } from "matrix-js-sdk/src/logger"; -import { RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../MatrixClientPeg"; import { ALL_RULE_TYPES, BanList } from "./BanList"; diff --git a/src/settings/handlers/AccountSettingsHandler.ts b/src/settings/handlers/AccountSettingsHandler.ts index 30424c3a16..16f8138e3b 100644 --- a/src/settings/handlers/AccountSettingsHandler.ts +++ b/src/settings/handlers/AccountSettingsHandler.ts @@ -16,7 +16,7 @@ limitations under the License. */ import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { defer } from "matrix-js-sdk/src/utils"; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; diff --git a/src/settings/handlers/RoomAccountSettingsHandler.ts b/src/settings/handlers/RoomAccountSettingsHandler.ts index 7048e3061c..49beb79ad3 100644 --- a/src/settings/handlers/RoomAccountSettingsHandler.ts +++ b/src/settings/handlers/RoomAccountSettingsHandler.ts @@ -16,8 +16,7 @@ limitations under the License. */ import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { defer } from "matrix-js-sdk/src/utils"; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; diff --git a/src/settings/handlers/RoomSettingsHandler.ts b/src/settings/handlers/RoomSettingsHandler.ts index e63613f64a..ca5b8cbd88 100644 --- a/src/settings/handlers/RoomSettingsHandler.ts +++ b/src/settings/handlers/RoomSettingsHandler.ts @@ -16,8 +16,7 @@ limitations under the License. */ import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { defer } from "matrix-js-sdk/src/utils"; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; diff --git a/src/shouldHideEvent.ts b/src/shouldHideEvent.ts index 9c32e62adb..ffc43bb00c 100644 --- a/src/shouldHideEvent.ts +++ b/src/shouldHideEvent.ts @@ -14,7 +14,7 @@ limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType, RelationType } from "matrix-js-sdk/src/@types/event"; import SettingsStore from "./settings/SettingsStore"; diff --git a/src/stores/OwnProfileStore.ts b/src/stores/OwnProfileStore.ts index c626b21f82..f1df607522 100644 --- a/src/stores/OwnProfileStore.ts +++ b/src/stores/OwnProfileStore.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, RoomStateEvent, MatrixError } from "matrix-js-sdk/src/matrix"; import { User, UserEvent } from "matrix-js-sdk/src/models/user"; -import { RoomStateEvent, MatrixError } from "matrix-js-sdk/src/matrix"; import { throttle } from "lodash"; import { EventType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index 162a52474b..9a4ac2ce06 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -23,8 +23,7 @@ import { logger } from "matrix-js-sdk/src/logger"; import { ViewRoom as ViewRoomEvent } from "@matrix-org/analytics-events/types/typescript/ViewRoom"; import { JoinedRoom as JoinedRoomEvent } from "@matrix-org/analytics-events/types/typescript/JoinedRoom"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; -import { Room } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Optional } from "matrix-events-sdk"; import EventEmitter from "events"; diff --git a/src/stores/VoiceRecordingStore.ts b/src/stores/VoiceRecordingStore.ts index e8de5fc4d5..ad0afb5bb5 100644 --- a/src/stores/VoiceRecordingStore.ts +++ b/src/stores/VoiceRecordingStore.ts @@ -15,9 +15,8 @@ limitations under the License. */ import { Optional } from "matrix-events-sdk"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, IEventRelation } from "matrix-js-sdk/src/matrix"; import { RelationType } from "matrix-js-sdk/src/@types/event"; -import { IEventRelation } from "matrix-js-sdk/src/models/event"; import { AsyncStoreWithClient } from "./AsyncStoreWithClient"; import defaultDispatcher from "../dispatcher/dispatcher"; diff --git a/src/stores/WidgetEchoStore.ts b/src/stores/WidgetEchoStore.ts index 4f621e2241..db5c9512f1 100644 --- a/src/stores/WidgetEchoStore.ts +++ b/src/stores/WidgetEchoStore.ts @@ -16,7 +16,7 @@ limitations under the License. import EventEmitter from "events"; import { IWidget } from "matrix-widget-api"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { WidgetType } from "../widgets/WidgetType"; diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index 2a73e8879b..9d759b56ec 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IWidget } from "matrix-widget-api"; import { logger } from "matrix-js-sdk/src/logger"; import { ClientEvent } from "matrix-js-sdk/src/client"; diff --git a/src/stores/local-echo/RoomEchoChamber.ts b/src/stores/local-echo/RoomEchoChamber.ts index 539e4b374f..860bdf406e 100644 --- a/src/stores/local-echo/RoomEchoChamber.ts +++ b/src/stores/local-echo/RoomEchoChamber.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, ClientEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { GenericEchoChamber, implicitlyReverted, PROPERTY_UPDATED } from "./GenericEchoChamber"; import { getRoomNotifsState, RoomNotifState, setRoomNotifsState } from "../../RoomNotifs"; diff --git a/src/stores/notifications/RoomNotificationState.ts b/src/stores/notifications/RoomNotificationState.ts index 418dce46a3..a0cde093fd 100644 --- a/src/stores/notifications/RoomNotificationState.ts +++ b/src/stores/notifications/RoomNotificationState.ts @@ -14,12 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEventEvent } from "matrix-js-sdk/src/models/event"; -import { RoomEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixEventEvent, RoomEvent } from "matrix-js-sdk/src/matrix"; import { ClientEvent } from "matrix-js-sdk/src/client"; -import type { Room } from "matrix-js-sdk/src/matrix"; -import type { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import type { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import type { IDestroyable } from "../../utils/IDestroyable"; import { MatrixClientPeg } from "../../MatrixClientPeg"; import { readReceiptChangeIsFor } from "../../utils/read-receipts"; diff --git a/src/stores/right-panel/RightPanelStoreIPanelState.ts b/src/stores/right-panel/RightPanelStoreIPanelState.ts index 654bc6f05e..d11bf36366 100644 --- a/src/stores/right-panel/RightPanelStoreIPanelState.ts +++ b/src/stores/right-panel/RightPanelStoreIPanelState.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { User } from "matrix-js-sdk/src/models/user"; -import { Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { VerificationRequest } from "matrix-js-sdk/src/crypto-api"; import { RightPanelPhases } from "./RightPanelStorePhases"; diff --git a/src/stores/room-list/MessagePreviewStore.ts b/src/stores/room-list/MessagePreviewStore.ts index efa79bec1e..f14ebe657a 100644 --- a/src/stores/room-list/MessagePreviewStore.ts +++ b/src/stores/room-list/MessagePreviewStore.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room, RelationType } from "matrix-js-sdk/src/matrix"; +import { Room, RelationType, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { isNullOrUndefined } from "matrix-js-sdk/src/utils"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { M_POLL_START } from "matrix-js-sdk/src/@types/polls"; import { Thread } from "matrix-js-sdk/src/models/thread"; diff --git a/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts b/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts index 9d42a0514e..9e825073c3 100644 --- a/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts +++ b/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { TagID } from "../../models"; import { IAlgorithm } from "./IAlgorithm"; diff --git a/src/stores/room-list/previews/IPreview.ts b/src/stores/room-list/previews/IPreview.ts index f45476dd2f..dcb10d68bd 100644 --- a/src/stores/room-list/previews/IPreview.ts +++ b/src/stores/room-list/previews/IPreview.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { TagID } from "../models"; diff --git a/src/stores/room-list/previews/LegacyCallAnswerEventPreview.ts b/src/stores/room-list/previews/LegacyCallAnswerEventPreview.ts index e8a604e31e..e49825c781 100644 --- a/src/stores/room-list/previews/LegacyCallAnswerEventPreview.ts +++ b/src/stores/room-list/previews/LegacyCallAnswerEventPreview.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IPreview } from "./IPreview"; import { TagID } from "../models"; diff --git a/src/stores/room-list/previews/LegacyCallHangupEvent.ts b/src/stores/room-list/previews/LegacyCallHangupEvent.ts index 397a491bcd..046c3aac90 100644 --- a/src/stores/room-list/previews/LegacyCallHangupEvent.ts +++ b/src/stores/room-list/previews/LegacyCallHangupEvent.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IPreview } from "./IPreview"; import { TagID } from "../models"; diff --git a/src/stores/room-list/previews/LegacyCallInviteEventPreview.ts b/src/stores/room-list/previews/LegacyCallInviteEventPreview.ts index 0afeaa56da..6223f41b55 100644 --- a/src/stores/room-list/previews/LegacyCallInviteEventPreview.ts +++ b/src/stores/room-list/previews/LegacyCallInviteEventPreview.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IPreview } from "./IPreview"; import { TagID } from "../models"; diff --git a/src/stores/room-list/previews/MessageEventPreview.ts b/src/stores/room-list/previews/MessageEventPreview.ts index e942101c35..3ae479e2c6 100644 --- a/src/stores/room-list/previews/MessageEventPreview.ts +++ b/src/stores/room-list/previews/MessageEventPreview.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MsgType, RelationType } from "matrix-js-sdk/src/@types/event"; import { IPreview } from "./IPreview"; diff --git a/src/stores/room-list/previews/PollStartEventPreview.ts b/src/stores/room-list/previews/PollStartEventPreview.ts index 8b49636f29..f6577889f7 100644 --- a/src/stores/room-list/previews/PollStartEventPreview.ts +++ b/src/stores/room-list/previews/PollStartEventPreview.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { PollStartEventContent } from "matrix-js-sdk/src/@types/polls"; import { InvalidEventError } from "matrix-js-sdk/src/extensible_events_v1/InvalidEventError"; import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent"; diff --git a/src/stores/room-list/previews/ReactionEventPreview.ts b/src/stores/room-list/previews/ReactionEventPreview.ts index a9f0658141..6b8783b2a7 100644 --- a/src/stores/room-list/previews/ReactionEventPreview.ts +++ b/src/stores/room-list/previews/ReactionEventPreview.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IPreview } from "./IPreview"; import { TagID } from "../models"; diff --git a/src/stores/room-list/previews/StickerEventPreview.ts b/src/stores/room-list/previews/StickerEventPreview.ts index ccf25a8f54..a960db5be2 100644 --- a/src/stores/room-list/previews/StickerEventPreview.ts +++ b/src/stores/room-list/previews/StickerEventPreview.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { IPreview } from "./IPreview"; import { TagID } from "../models"; diff --git a/src/stores/room-list/previews/utils.ts b/src/stores/room-list/previews/utils.ts index 07a561a219..8e7462affe 100644 --- a/src/stores/room-list/previews/utils.ts +++ b/src/stores/room-list/previews/utils.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { DefaultTagID, TagID } from "../models"; diff --git a/src/stores/spaces/SpaceStore.ts b/src/stores/spaces/SpaceStore.ts index a2e0679bcb..dbdcb87800 100644 --- a/src/stores/spaces/SpaceStore.ts +++ b/src/stores/spaces/SpaceStore.ts @@ -16,8 +16,7 @@ limitations under the License. import { ListIteratee, Many, sortBy } from "lodash"; import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; -import { Room, RoomEvent, RoomMember, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomEvent, RoomMember, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { ClientEvent } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; import { ISendEventResponse } from "matrix-js-sdk/src/@types/requests"; diff --git a/src/stores/widgets/StopGapWidget.ts b/src/stores/widgets/StopGapWidget.ts index 0ba44f3d8b..6cfbea400f 100644 --- a/src/stores/widgets/StopGapWidget.ts +++ b/src/stores/widgets/StopGapWidget.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import { ClientWidgetApi, IModalWidgetOpenRequest, @@ -36,7 +36,6 @@ import { import { Optional } from "matrix-events-sdk"; import { EventEmitter } from "events"; import { MatrixClient, ClientEvent } from "matrix-js-sdk/src/client"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; import { logger } from "matrix-js-sdk/src/logger"; import { _t, getUserLanguage } from "../../languageHandler"; diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 71bb807a67..cc68b73a4b 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -35,8 +35,7 @@ import { } from "matrix-widget-api"; import { ClientEvent, ITurnServer as IClientTurnServer } from "matrix-js-sdk/src/client"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, Direction } from "matrix-js-sdk/src/matrix"; +import { IContent, MatrixEvent, Room, Direction } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; import { diff --git a/src/stores/widgets/WidgetLayoutStore.ts b/src/stores/widgets/WidgetLayoutStore.ts index aeb6e45d30..c965836c8b 100644 --- a/src/stores/widgets/WidgetLayoutStore.ts +++ b/src/stores/widgets/WidgetLayoutStore.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Optional } from "matrix-events-sdk"; import { compare, MapWithDefault, recursiveMapToObject } from "matrix-js-sdk/src/utils"; import { IWidget } from "matrix-widget-api"; diff --git a/src/toasts/IncomingCallToast.tsx b/src/toasts/IncomingCallToast.tsx index 1dd7a0343c..6f6d01158c 100644 --- a/src/toasts/IncomingCallToast.tsx +++ b/src/toasts/IncomingCallToast.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useCallback, useEffect } from "react"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../languageHandler"; import RoomAvatar from "../components/views/avatars/RoomAvatar"; diff --git a/src/utils/DMRoomMap.ts b/src/utils/DMRoomMap.ts index e2ec501289..a29131b51b 100644 --- a/src/utils/DMRoomMap.ts +++ b/src/utils/DMRoomMap.ts @@ -15,11 +15,10 @@ limitations under the License. */ import { uniq } from "lodash"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { Optional } from "matrix-events-sdk"; import { filterValidMDirect } from "./dm/filterValidMDirect"; diff --git a/src/utils/EditorStateTransfer.ts b/src/utils/EditorStateTransfer.ts index 1604d22530..35d51b0ebe 100644 --- a/src/utils/EditorStateTransfer.ts +++ b/src/utils/EditorStateTransfer.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { SerializedPart } from "../editor/parts"; import DocumentOffset from "../editor/offset"; diff --git a/src/utils/EventRenderingUtils.ts b/src/utils/EventRenderingUtils.ts index ebbd688c9c..325c15e800 100644 --- a/src/utils/EventRenderingUtils.ts +++ b/src/utils/EventRenderingUtils.ts @@ -14,11 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, IContent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls"; import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon"; -import { IContent, MatrixClient } from "matrix-js-sdk/src/matrix"; import SettingsStore from "../settings/SettingsStore"; import { haveRendererForEvent, JitsiEventFactory, JSONEventFactory, pickFactory } from "../events/EventTileFactory"; diff --git a/src/utils/EventUtils.ts b/src/utils/EventUtils.ts index 4a1762a1c0..929d19a3bf 100644 --- a/src/utils/EventUtils.ts +++ b/src/utils/EventUtils.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType, EVENT_VISIBILITY_CHANGE_TYPE, MsgType, RelationType } from "matrix-js-sdk/src/@types/event"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/utils/MessageDiffUtils.tsx b/src/utils/MessageDiffUtils.tsx index 04167ccddd..ab45a7a7fc 100644 --- a/src/utils/MessageDiffUtils.tsx +++ b/src/utils/MessageDiffUtils.tsx @@ -18,7 +18,7 @@ import React from "react"; import classNames from "classnames"; import { diff_match_patch as DiffMatchPatch } from "diff-match-patch"; import { DiffDOM, IDiff } from "diff-dom"; -import { IContent } from "matrix-js-sdk/src/models/event"; +import { IContent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { unescape } from "lodash"; diff --git a/src/utils/PinningUtils.ts b/src/utils/PinningUtils.ts index 8e146e9876..3e0fda9019 100644 --- a/src/utils/PinningUtils.ts +++ b/src/utils/PinningUtils.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { M_POLL_START } from "matrix-js-sdk/src/@types/polls"; diff --git a/src/utils/Reply.ts b/src/utils/Reply.ts index ee5efcc5db..37d215a6e0 100644 --- a/src/utils/Reply.ts +++ b/src/utils/Reply.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { IContent, IEventRelation, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { IContent, IEventRelation, MatrixEvent } from "matrix-js-sdk/src/matrix"; import sanitizeHtml from "sanitize-html"; import escapeHtml from "escape-html"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; diff --git a/src/utils/WidgetUtils.ts b/src/utils/WidgetUtils.ts index 256caadf80..688ac59506 100644 --- a/src/utils/WidgetUtils.ts +++ b/src/utils/WidgetUtils.ts @@ -17,8 +17,7 @@ limitations under the License. import { base32 } from "rfc4648"; import { IWidget, IWidgetData } from "matrix-widget-api"; -import { Room, ClientEvent, MatrixClient, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, ClientEvent, MatrixClient, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { CallType } from "matrix-js-sdk/src/webrtc/call"; import { randomString, randomLowercaseString, randomUppercaseString } from "matrix-js-sdk/src/randomstring"; diff --git a/src/utils/exportUtils/Exporter.ts b/src/utils/exportUtils/Exporter.ts index bebc4cec51..5cffdd2080 100644 --- a/src/utils/exportUtils/Exporter.ts +++ b/src/utils/exportUtils/Exporter.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { Direction } from "matrix-js-sdk/src/models/event-timeline"; import { saveAs } from "file-saver"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/utils/exportUtils/HtmlExport.tsx b/src/utils/exportUtils/HtmlExport.tsx index 1f7a474d66..ec86e223b8 100644 --- a/src/utils/exportUtils/HtmlExport.tsx +++ b/src/utils/exportUtils/HtmlExport.tsx @@ -16,8 +16,7 @@ limitations under the License. import React from "react"; import ReactDOM from "react-dom"; -import { Room } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { renderToStaticMarkup } from "react-dom/server"; import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/utils/exportUtils/JSONExport.ts b/src/utils/exportUtils/JSONExport.ts index 342dc633ac..225902e3c3 100644 --- a/src/utils/exportUtils/JSONExport.ts +++ b/src/utils/exportUtils/JSONExport.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/matrix"; -import { IEvent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, IEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/utils/exportUtils/PlainTextExport.ts b/src/utils/exportUtils/PlainTextExport.ts index 9d44754171..45302a5b68 100644 --- a/src/utils/exportUtils/PlainTextExport.ts +++ b/src/utils/exportUtils/PlainTextExport.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/matrix"; -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, IContent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import React from "react"; diff --git a/src/utils/leave-behaviour.ts b/src/utils/leave-behaviour.ts index 094b5ee515..429a64d1d7 100644 --- a/src/utils/leave-behaviour.ts +++ b/src/utils/leave-behaviour.ts @@ -17,8 +17,7 @@ limitations under the License. import { sleep } from "matrix-js-sdk/src/utils"; import React, { ReactNode } from "react"; import { EventStatus } from "matrix-js-sdk/src/models/event-status"; -import { MatrixEventEvent } from "matrix-js-sdk/src/models/event"; -import { Room, MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix"; +import { MatrixEventEvent, Room, MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix"; import Modal, { IHandle } from "../Modal"; import Spinner from "../components/views/elements/Spinner"; diff --git a/src/utils/membership.ts b/src/utils/membership.ts index a61e241e1a..03a6a4a3c1 100644 --- a/src/utils/membership.ts +++ b/src/utils/membership.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room, RoomMember, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { Room, RoomMember, RoomState, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; /** * Approximation of a membership status for a given room. diff --git a/src/utils/pillify.tsx b/src/utils/pillify.tsx index bac0138bc0..aba0281413 100644 --- a/src/utils/pillify.tsx +++ b/src/utils/pillify.tsx @@ -17,8 +17,7 @@ limitations under the License. import React from "react"; import ReactDOM from "react-dom"; import { PushProcessor } from "matrix-js-sdk/src/pushprocessor"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import SettingsStore from "../settings/SettingsStore"; import { Pill, PillType, pillRoomNotifLen, pillRoomNotifPos } from "../components/views/elements/Pill"; diff --git a/src/utils/read-receipts.ts b/src/utils/read-receipts.ts index 67de1e5012..c6dbbcb7ec 100644 --- a/src/utils/read-receipts.ts +++ b/src/utils/read-receipts.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { isSupportedReceiptType } from "matrix-js-sdk/src/utils"; diff --git a/test/HtmlUtils-test.tsx b/test/HtmlUtils-test.tsx index 779e694f83..f177fc1b47 100644 --- a/test/HtmlUtils-test.tsx +++ b/test/HtmlUtils-test.tsx @@ -17,7 +17,7 @@ limitations under the License. import React, { ReactElement } from "react"; import { mocked } from "jest-mock"; import { render, screen } from "@testing-library/react"; -import { IContent } from "matrix-js-sdk/src/models/event"; +import { IContent } from "matrix-js-sdk/src/matrix"; import { bodyToHtml, formatEmojis, topicToHtml } from "../src/HtmlUtils"; import SettingsStore from "../src/settings/SettingsStore"; diff --git a/test/Notifier-test.ts b/test/Notifier-test.ts index a966222a1d..89a52f5517 100644 --- a/test/Notifier-test.ts +++ b/test/Notifier-test.ts @@ -16,8 +16,7 @@ limitations under the License. import { mocked, MockedObject } from "jest-mock"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { Room, RoomEvent, EventType, MsgType } from "matrix-js-sdk/src/matrix"; -import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, RoomEvent, EventType, MsgType, IContent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { SyncState } from "matrix-js-sdk/src/sync"; import { waitFor } from "@testing-library/react"; diff --git a/test/components/structures/RoomSearchView-test.tsx b/test/components/structures/RoomSearchView-test.tsx index 2643257ae7..b9d98a34ab 100644 --- a/test/components/structures/RoomSearchView-test.tsx +++ b/test/components/structures/RoomSearchView-test.tsx @@ -17,11 +17,10 @@ limitations under the License. import React from "react"; import { mocked } from "jest-mock"; import { render, screen } from "@testing-library/react"; -import { Room, MatrixClient } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixClient, IEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { ISearchResults } from "matrix-js-sdk/src/@types/search"; import { defer } from "matrix-js-sdk/src/utils"; import { SearchResult } from "matrix-js-sdk/src/models/search-result"; -import { IEvent, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { RoomSearchView } from "../../../src/components/structures/RoomSearchView"; diff --git a/test/components/structures/RoomStatusBar-test.tsx b/test/components/structures/RoomStatusBar-test.tsx index 0e262e2792..5bd3140e74 100644 --- a/test/components/structures/RoomStatusBar-test.tsx +++ b/test/components/structures/RoomStatusBar-test.tsx @@ -17,8 +17,7 @@ limitations under the License. import React from "react"; import { render } from "@testing-library/react"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { EventStatus, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { MatrixError } from "matrix-js-sdk/src/http-api"; import RoomStatusBar, { getUnsentMessages } from "../../../src/components/structures/RoomStatusBar"; diff --git a/test/components/structures/RoomView-test.tsx b/test/components/structures/RoomView-test.tsx index 4b774ee852..4cb34645e3 100644 --- a/test/components/structures/RoomView-test.tsx +++ b/test/components/structures/RoomView-test.tsx @@ -17,8 +17,15 @@ limitations under the License. import React, { createRef, RefObject } from "react"; import { mocked, MockedObject } from "jest-mock"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { Room, RoomEvent, EventType, JoinRule, MatrixError, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { + Room, + RoomEvent, + EventType, + JoinRule, + MatrixError, + RoomStateEvent, + MatrixEvent, +} from "matrix-js-sdk/src/matrix"; import { MEGOLM_ALGORITHM } from "matrix-js-sdk/src/crypto/olmlib"; import { fireEvent, render, screen, RenderResult } from "@testing-library/react"; diff --git a/test/components/structures/ThreadView-test.tsx b/test/components/structures/ThreadView-test.tsx index d234ff798e..bbeb7c1903 100644 --- a/test/components/structures/ThreadView-test.tsx +++ b/test/components/structures/ThreadView-test.tsx @@ -19,8 +19,7 @@ import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; import { MsgType, RelationType } from "matrix-js-sdk/src/@types/event"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { EventStatus, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; import React, { useState } from "react"; diff --git a/test/components/views/context_menus/MessageContextMenu-test.tsx b/test/components/views/context_menus/MessageContextMenu-test.tsx index ffe1222ecd..a8d1822fa8 100644 --- a/test/components/views/context_menus/MessageContextMenu-test.tsx +++ b/test/components/views/context_menus/MessageContextMenu-test.tsx @@ -16,8 +16,9 @@ limitations under the License. import React from "react"; import { fireEvent, render, RenderResult } from "@testing-library/react"; -import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { + EventStatus, + MatrixEvent, Room, PendingEventOrdering, BeaconIdentifier, diff --git a/test/components/views/context_menus/ThreadListContextMenu-test.tsx b/test/components/views/context_menus/ThreadListContextMenu-test.tsx index 4a035f6b94..616be7bd50 100644 --- a/test/components/views/context_menus/ThreadListContextMenu-test.tsx +++ b/test/components/views/context_menus/ThreadListContextMenu-test.tsx @@ -18,8 +18,7 @@ import { getByTestId, render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import ThreadListContextMenu, { diff --git a/test/components/views/elements/PollCreateDialog-test.tsx b/test/components/views/elements/PollCreateDialog-test.tsx index dab9a9b9bc..738597af56 100644 --- a/test/components/views/elements/PollCreateDialog-test.tsx +++ b/test/components/views/elements/PollCreateDialog-test.tsx @@ -16,10 +16,9 @@ limitations under the License. import React from "react"; import { fireEvent, render, RenderResult } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { M_POLL_KIND_DISCLOSED, M_POLL_KIND_UNDISCLOSED, M_POLL_START } from "matrix-js-sdk/src/@types/polls"; import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events"; import { getMockClientWithEventEmitter } from "../../../test-utils"; diff --git a/test/components/views/messages/LegacyCallEvent-test.tsx b/test/components/views/messages/LegacyCallEvent-test.tsx index 3b665897ec..3a6f1f3d71 100644 --- a/test/components/views/messages/LegacyCallEvent-test.tsx +++ b/test/components/views/messages/LegacyCallEvent-test.tsx @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import { render, screen } from "@testing-library/react"; import { CallErrorCode, CallState } from "matrix-js-sdk/src/webrtc/call"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import LegacyCallEvent from "../../../../src/components/views/messages/LegacyCallEvent"; import LegacyCallEventGrouper from "../../../../src/components/structures/LegacyCallEventGrouper"; diff --git a/test/components/views/right_panel/PinnedMessagesCard-test.tsx b/test/components/views/right_panel/PinnedMessagesCard-test.tsx index 74daa269f1..c7dfa6949c 100644 --- a/test/components/views/right_panel/PinnedMessagesCard-test.tsx +++ b/test/components/views/right_panel/PinnedMessagesCard-test.tsx @@ -17,9 +17,8 @@ limitations under the License. import React from "react"; import { render, act, RenderResult, fireEvent, waitForElementToBeRemoved, screen } from "@testing-library/react"; import { mocked } from "jest-mock"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, RoomStateEvent, IEvent, Room, EventTimelineSet, IMinimalEvent } from "matrix-js-sdk/src/matrix"; import { EventType, RelationType, MsgType } from "matrix-js-sdk/src/@types/event"; -import { RoomStateEvent, IEvent, Room, EventTimelineSet, IMinimalEvent } from "matrix-js-sdk/src/matrix"; import { M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/src/@types/polls"; import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent"; import { PollResponseEvent } from "matrix-js-sdk/src/extensible_events_v1/PollResponseEvent"; diff --git a/test/components/views/rooms/EventTile-test.tsx b/test/components/views/rooms/EventTile-test.tsx index c4925a33ad..115f41ca10 100644 --- a/test/components/views/rooms/EventTile-test.tsx +++ b/test/components/views/rooms/EventTile-test.tsx @@ -19,8 +19,7 @@ import { render, waitFor, screen, act, fireEvent } from "@testing-library/react" import { mocked } from "jest-mock"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { CryptoApi, TweakName, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { CryptoApi, TweakName, NotificationCountType, Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { DeviceTrustLevel, UserTrustLevel } from "matrix-js-sdk/src/crypto/CrossSigning"; import { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo"; import { IEncryptedEventInfo } from "matrix-js-sdk/src/crypto/api"; diff --git a/test/components/views/rooms/LegacyRoomHeader-test.tsx b/test/components/views/rooms/LegacyRoomHeader-test.tsx index 63ca1d6b56..db7fa01427 100644 --- a/test/components/views/rooms/LegacyRoomHeader-test.tsx +++ b/test/components/views/rooms/LegacyRoomHeader-test.tsx @@ -26,8 +26,7 @@ import EventEmitter from "events"; import { ISearchResults } from "matrix-js-sdk/src/@types/search"; import type { MatrixClient } from "matrix-js-sdk/src/client"; -import type { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import type { RoomMember } from "matrix-js-sdk/src/matrix"; +import type { MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix"; import type { MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import { stubClient, diff --git a/test/components/views/rooms/SearchResultTile-test.tsx b/test/components/views/rooms/SearchResultTile-test.tsx index 45cb08199f..b856a3f0e9 100644 --- a/test/components/views/rooms/SearchResultTile-test.tsx +++ b/test/components/views/rooms/SearchResultTile-test.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import * as React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { render, type RenderResult } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/matrix"; import { stubClient } from "../../../test-utils"; import SearchResultTile from "../../../../src/components/views/rooms/SearchResultTile"; diff --git a/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx b/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx index ca4eece4b3..ddc374818c 100644 --- a/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx @@ -18,8 +18,7 @@ import React from "react"; import { fireEvent, render, RenderResult, screen } from "@testing-library/react"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomMember } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; import RolesRoomSettingsTab from "../../../../../../src/components/views/settings/tabs/room/RolesRoomSettingsTab"; diff --git a/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx b/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx index 1cd920a027..4a637ac6f0 100644 --- a/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx @@ -17,8 +17,7 @@ limitations under the License. import React from "react"; import { fireEvent, render, RenderResult, waitFor } from "@testing-library/react"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/matrix"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; diff --git a/test/test-utils/call.ts b/test/test-utils/call.ts index c495afdb29..8c1f3dffb3 100644 --- a/test/test-utils/call.ts +++ b/test/test-utils/call.ts @@ -17,8 +17,7 @@ limitations under the License. import { MatrixWidgetType } from "matrix-widget-api"; import type { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall"; -import type { Room, RoomMember } from "matrix-js-sdk/src/matrix"; -import type { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import type { Room, RoomMember, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { mkEvent } from "./test-utils"; import { Call, ConnectionState, ElementCall, JitsiCall } from "../../src/models/Call"; import { CallStore } from "../../src/stores/CallStore"; diff --git a/test/test-utils/test-utils.ts b/test/test-utils/test-utils.ts index 3f4724ea4c..285929d8d6 100644 --- a/test/test-utils/test-utils.ts +++ b/test/test-utils/test-utils.ts @@ -16,9 +16,8 @@ limitations under the License. import EventEmitter from "events"; import { mocked, MockedObject } from "jest-mock"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { JoinRule } from "matrix-js-sdk/src/@types/partials"; import { + MatrixEvent, Room, User, IContent, @@ -37,6 +36,7 @@ import { IPushRules, RelationType, } from "matrix-js-sdk/src/matrix"; +import { JoinRule } from "matrix-js-sdk/src/@types/partials"; import { normalize } from "matrix-js-sdk/src/utils"; import { ReEmitter } from "matrix-js-sdk/src/ReEmitter"; import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler"; diff --git a/test/toasts/IncomingCallToast-test.tsx b/test/toasts/IncomingCallToast-test.tsx index d3f47e4a5b..360a238d93 100644 --- a/test/toasts/IncomingCallToast-test.tsx +++ b/test/toasts/IncomingCallToast-test.tsx @@ -17,10 +17,9 @@ limitations under the License. import React from "react"; import { render, screen, cleanup, fireEvent, waitFor } from "@testing-library/react"; import { mocked, Mocked } from "jest-mock"; -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { Room, RoomStateEvent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { ClientWidgetApi, Widget } from "matrix-widget-api"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; import type { RoomMember } from "matrix-js-sdk/src/matrix"; import { diff --git a/test/utils/notifications-test.ts b/test/utils/notifications-test.ts index 4eade95e21..f777ac36c1 100644 --- a/test/utils/notifications-test.ts +++ b/test/utils/notifications-test.ts @@ -14,10 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { MatrixEvent, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { Mocked, mocked } from "jest-mock"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; import { diff --git a/test/utils/pillify-test.tsx b/test/utils/pillify-test.tsx index bdcc73ad1d..c5a00a6828 100644 --- a/test/utils/pillify-test.tsx +++ b/test/utils/pillify-test.tsx @@ -16,8 +16,7 @@ limitations under the License. import React from "react"; import { render } from "@testing-library/react"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { ConditionKind, EventType, PushRuleActionName, Room, TweakName } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, ConditionKind, EventType, PushRuleActionName, Room, TweakName } from "matrix-js-sdk/src/matrix"; import { pillifyLinks } from "../../src/utils/pillify"; import { stubClient } from "../test-utils";