diff --git a/.eslintrc.js b/.eslintrc.js index c7b74244556..08f8b735794 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -36,6 +36,7 @@ module.exports = { ), ], + "import/no-duplicates": ["error"], // Ban matrix-js-sdk/src imports in favour of matrix-js-sdk/src/matrix imports to prevent unleashing hell. "no-restricted-imports": [ "error", @@ -65,6 +66,10 @@ module.exports = { name: "matrix-js-sdk/src/models/typed-event-emitter", message: "Please use matrix-js-sdk/src/matrix instead", }, + { + name: "matrix-js-sdk/src/models/room", + message: "Please use matrix-js-sdk/src/matrix instead", + }, { name: "matrix-react-sdk", message: "Please use matrix-react-sdk/src/index instead", @@ -82,7 +87,6 @@ module.exports = { ], }, ], - "import/no-duplicates": ["error"], // There are too many a11y violations to fix at once // Turn violated rules off until they are fixed diff --git a/src/Avatar.ts b/src/Avatar.ts index 3873a1a59de..13dd2800669 100644 --- a/src/Avatar.ts +++ b/src/Avatar.ts @@ -14,10 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { RoomMember } from "matrix-js-sdk/src/models/room-member"; -import { User } from "matrix-js-sdk/src/models/user"; -import { Room } from "matrix-js-sdk/src/models/room"; -import { ResizeMethod } from "matrix-js-sdk/src/@types/partials"; +import { RoomMember, User, Room, ResizeMethod } from "matrix-js-sdk/src/matrix"; import DMRoomMap from "./utils/DMRoomMap"; import { mediaFromMxc } from "./customisations/Media"; diff --git a/src/BasePlatform.ts b/src/BasePlatform.ts index da083f27167..b43ecfcd8ba 100644 --- a/src/BasePlatform.ts +++ b/src/BasePlatform.ts @@ -17,12 +17,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient, MatrixEvent, Room, SSOAction } from "matrix-js-sdk/src/matrix"; import { encodeUnpaddedBase64 } from "matrix-js-sdk/src/crypto/olmlib"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/models/room"; -import { SSOAction } from "matrix-js-sdk/src/@types/auth"; import dis from "./dispatcher/dispatcher"; import BaseEventIndexManager from "./indexing/BaseEventIndexManager"; diff --git a/src/Notifier.ts b/src/Notifier.ts index 047a59bc890..839be8c83a6 100644 --- a/src/Notifier.ts +++ b/src/Notifier.ts @@ -17,15 +17,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; -import { ClientEvent } from "matrix-js-sdk/src/client"; +import { + MatrixEvent, + MatrixEventEvent, + Room, + RoomEvent, + ClientEvent, + MsgType, + SyncState, + SyncStateData, + IRoomTimelineData, +} from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { MsgType } from "matrix-js-sdk/src/@types/event"; import { M_LOCATION } from "matrix-js-sdk/src/@types/location"; import { PermissionChanged as PermissionChangedEvent } from "@matrix-org/analytics-events/types/typescript/PermissionChanged"; -import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync"; -import { IRoomTimelineData } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "./MatrixClientPeg"; import { PosthogAnalytics } from "./PosthogAnalytics"; @@ -393,7 +398,7 @@ class NotifierClass { } // XXX: Exported for tests - public onSyncStateChange = (state: SyncState, prevState: SyncState | null, data?: ISyncStateData): void => { + public onSyncStateChange = (state: SyncState, prevState: SyncState | null, data?: SyncStateData): void => { if (state === SyncState.Syncing) { this.isSyncing = true; } else if (state === SyncState.Stopped || state === SyncState.Error) { diff --git a/src/Resend.ts b/src/Resend.ts index cbd43661c47..b79db754430 100644 --- a/src/Resend.ts +++ b/src/Resend.ts @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent, EventStatus } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { MatrixEvent, EventStatus, Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; import dis from "./dispatcher/dispatcher"; diff --git a/src/RoomInvite.tsx b/src/RoomInvite.tsx index 6c49de20905..63c4b08e78c 100644 --- a/src/RoomInvite.tsx +++ b/src/RoomInvite.tsx @@ -15,12 +15,8 @@ limitations under the License. */ import React, { ComponentProps } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { User } from "matrix-js-sdk/src/models/user"; +import { Room, MatrixEvent, MatrixClient, User, EventType } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { EventType } from "matrix-js-sdk/src/@types/event"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; import MultiInviter, { CompletionStates } from "./utils/MultiInviter"; import Modal from "./Modal"; diff --git a/src/RoomNotifs.ts b/src/RoomNotifs.ts index 543704f8b31..c99026ceaa4 100644 --- a/src/RoomNotifs.ts +++ b/src/RoomNotifs.ts @@ -15,12 +15,15 @@ limitations under the License. */ import { PushProcessor } from "matrix-js-sdk/src/pushprocessor"; -import { NotificationCountType } from "matrix-js-sdk/src/models/room"; -import { ConditionKind, PushRuleActionName, PushRuleKind, TweakName } from "matrix-js-sdk/src/@types/PushRules"; - -import type { IPushRule } from "matrix-js-sdk/src/@types/PushRules"; -import type { Room } from "matrix-js-sdk/src/models/room"; -import type { MatrixClient } from "matrix-js-sdk/src/matrix"; +import { + NotificationCountType, + ConditionKind, + PushRuleActionName, + PushRuleKind, + TweakName, +} from "matrix-js-sdk/src/matrix"; + +import type { IPushRule, Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { NotificationColor } from "./stores/notifications/NotificationColor"; import { getUnsentMessages } from "./components/structures/RoomStatusBar"; import { doesRoomHaveUnreadMessages, doesRoomOrThreadHaveUnreadMessages } from "./Unread"; diff --git a/src/Rooms.ts b/src/Rooms.ts index e5b38f5ba96..9e14f026c71 100644 --- a/src/Rooms.ts +++ b/src/Rooms.ts @@ -14,10 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; -import { EventType } from "matrix-js-sdk/src/@types/event"; -import { RoomMember } from "matrix-js-sdk/src/models/room-member"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; +import { Room, EventType, RoomMember, MatrixClient } from "matrix-js-sdk/src/matrix"; import AliasCustomisations from "./customisations/Alias"; diff --git a/src/ScalarAuthClient.ts b/src/ScalarAuthClient.ts index 07dc4788761..56069c21031 100644 --- a/src/ScalarAuthClient.ts +++ b/src/ScalarAuthClient.ts @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { SERVICE_TYPES } from "matrix-js-sdk/src/service-types"; -import { Room } from "matrix-js-sdk/src/models/room"; import { logger } from "matrix-js-sdk/src/logger"; -import { IOpenIDToken } from "matrix-js-sdk/src/matrix"; +import { SERVICE_TYPES, Room, IOpenIDToken } from "matrix-js-sdk/src/matrix"; import SettingsStore from "./settings/SettingsStore"; import { Service, startTermsFlow, TermsInteractionCallback, TermsNotSignedError } from "./Terms"; diff --git a/src/Unread.ts b/src/Unread.ts index 520d6c97f9c..6185407a9b4 100644 --- a/src/Unread.ts +++ b/src/Unread.ts @@ -14,13 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; -import { Thread } from "matrix-js-sdk/src/models/thread"; -import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { EventType } from "matrix-js-sdk/src/@types/event"; import { M_BEACON } from "matrix-js-sdk/src/@types/beacon"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; +import { Room, Thread, MatrixEvent, EventType, MatrixClient } from "matrix-js-sdk/src/matrix"; import shouldHideEvent from "./shouldHideEvent"; import { haveRendererForEvent } from "./events/EventTileFactory"; diff --git a/src/VoipUserMapper.ts b/src/VoipUserMapper.ts index d1f5b5817cb..d03a38b333b 100644 --- a/src/VoipUserMapper.ts +++ b/src/VoipUserMapper.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/models/room"; +import { Room, EventType } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { EventType } from "matrix-js-sdk/src/@types/event"; import { ensureVirtualRoomExists } from "./createRoom"; import { MatrixClientPeg } from "./MatrixClientPeg"; diff --git a/src/WhoIsTyping.ts b/src/WhoIsTyping.ts index 500d60e0b94..c299d8932c0 100644 --- a/src/WhoIsTyping.ts +++ b/src/WhoIsTyping.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/models/room"; -import { RoomMember } from "matrix-js-sdk/src/models/room-member"; +import { Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { _t } from "./languageHandler"; diff --git a/src/actions/MatrixActionCreators.ts b/src/actions/MatrixActionCreators.ts index 3cc1828a565..b3f17d8bb17 100644 --- a/src/actions/MatrixActionCreators.ts +++ b/src/actions/MatrixActionCreators.ts @@ -14,11 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; -import { IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set"; -import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; +import { + ClientEvent, + MatrixClient, + MatrixEvent, + MatrixEventEvent, + Room, + RoomEvent, + IRoomTimelineData, + RoomState, + RoomStateEvent, +} from "matrix-js-sdk/src/matrix"; import dis from "../dispatcher/dispatcher"; import { ActionPayload } from "../dispatcher/payloads"; diff --git a/src/actions/RoomListActions.ts b/src/actions/RoomListActions.ts index d8355e0a370..cb12081f156 100644 --- a/src/actions/RoomListActions.ts +++ b/src/actions/RoomListActions.ts @@ -15,8 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { MatrixClient, Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { asyncAction } from "./actionCreators"; diff --git a/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx b/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx index 517a56d23b3..c4ff13bbcfe 100644 --- a/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx +++ b/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ChangeEvent } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../../languageHandler"; import SdkConfig from "../../../../SdkConfig"; diff --git a/src/audio/PlaybackQueue.ts b/src/audio/PlaybackQueue.ts index c9b61cc2f6d..a32fb54e738 100644 --- a/src/audio/PlaybackQueue.ts +++ b/src/audio/PlaybackQueue.ts @@ -14,9 +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/models/room"; -import { EventType } from "matrix-js-sdk/src/@types/event"; +import { MatrixEvent, Room, EventType } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { Playback, PlaybackState } from "./Playback"; diff --git a/src/autocomplete/Autocompleter.ts b/src/autocomplete/Autocompleter.ts index 51c160320b4..7919608ca45 100644 --- a/src/autocomplete/Autocompleter.ts +++ b/src/autocomplete/Autocompleter.ts @@ -16,7 +16,7 @@ limitations under the License. */ import { ReactElement } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import CommandProvider from "./CommandProvider"; import RoomProvider from "./RoomProvider"; diff --git a/src/autocomplete/CommandProvider.tsx b/src/autocomplete/CommandProvider.tsx index 2cac8177628..4dc13f1e223 100644 --- a/src/autocomplete/CommandProvider.tsx +++ b/src/autocomplete/CommandProvider.tsx @@ -18,7 +18,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../languageHandler"; import AutocompleteProvider from "./AutocompleteProvider"; diff --git a/src/autocomplete/EmojiProvider.tsx b/src/autocomplete/EmojiProvider.tsx index b93973a2d47..fbf119dfcc5 100644 --- a/src/autocomplete/EmojiProvider.tsx +++ b/src/autocomplete/EmojiProvider.tsx @@ -21,7 +21,7 @@ limitations under the License. import React from "react"; import { uniq, sortBy, uniqBy, ListIteratee } from "lodash"; import EMOTICON_REGEX from "emojibase-regex/emoticon"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../languageHandler"; import AutocompleteProvider from "./AutocompleteProvider"; diff --git a/src/autocomplete/NotifProvider.tsx b/src/autocomplete/NotifProvider.tsx index 51373a74030..6d23c3694dd 100644 --- a/src/autocomplete/NotifProvider.tsx +++ b/src/autocomplete/NotifProvider.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import AutocompleteProvider from "./AutocompleteProvider"; import { _t } from "../languageHandler"; diff --git a/src/autocomplete/RoomProvider.tsx b/src/autocomplete/RoomProvider.tsx index a28777e65d6..c60c901f7c1 100644 --- a/src/autocomplete/RoomProvider.tsx +++ b/src/autocomplete/RoomProvider.tsx @@ -18,7 +18,7 @@ limitations under the License. import React from "react"; import { sortBy, uniqBy } from "lodash"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../languageHandler"; import AutocompleteProvider from "./AutocompleteProvider"; diff --git a/src/autocomplete/SpaceProvider.tsx b/src/autocomplete/SpaceProvider.tsx index 4c6b8a32590..c08fef04c2a 100644 --- a/src/autocomplete/SpaceProvider.tsx +++ b/src/autocomplete/SpaceProvider.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import { _t } from "../languageHandler"; diff --git a/src/autocomplete/UserProvider.tsx b/src/autocomplete/UserProvider.tsx index 51a98064083..04ae3828df2 100644 --- a/src/autocomplete/UserProvider.tsx +++ b/src/autocomplete/UserProvider.tsx @@ -20,7 +20,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 } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set"; diff --git a/src/components/structures/FilePanel.tsx b/src/components/structures/FilePanel.tsx index be3d1e981f4..d9ebb1de9f8 100644 --- a/src/components/structures/FilePanel.tsx +++ b/src/components/structures/FilePanel.tsx @@ -20,7 +20,7 @@ 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/models/room"; +import { 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/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index c2c46a28a95..70e281d2957 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -17,7 +17,7 @@ limitations under the License. import React, { createRef, ReactNode, TransitionEvent } from "react"; import ReactDOM from "react-dom"; import classNames from "classnames"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixClient } 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"; @@ -25,7 +25,6 @@ import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon"; import { isSupportedReceiptType } from "matrix-js-sdk/src/utils"; import { Optional } from "matrix-events-sdk"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; import shouldHideEvent from "../../shouldHideEvent"; import { wantsDateSeparator } from "../../DateUtils"; diff --git a/src/components/structures/RightPanel.tsx b/src/components/structures/RightPanel.tsx index 23bf75a33d8..db551422795 100644 --- a/src/components/structures/RightPanel.tsx +++ b/src/components/structures/RightPanel.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; diff --git a/src/components/structures/RoomStatusBar.tsx b/src/components/structures/RoomStatusBar.tsx index 5759289c7d9..68d1c03ae3c 100644 --- a/src/components/structures/RoomStatusBar.tsx +++ b/src/components/structures/RoomStatusBar.tsx @@ -17,8 +17,7 @@ limitations under the License. import React, { ReactNode } from "react"; import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { SyncState, ISyncStateData } from "matrix-js-sdk/src/sync"; -import { Room } from "matrix-js-sdk/src/models/room"; -import { MatrixError } from "matrix-js-sdk/src/matrix"; +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 8abdd0c16bc..97475833400 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -19,7 +19,7 @@ limitations under the License. import React, { createRef, ReactElement, ReactNode, RefObject, useContext } from "react"; import classNames from "classnames"; -import { IRecommendedVersion, NotificationCountType, Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { IRecommendedVersion, NotificationCountType, Room, RoomEvent } 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"; diff --git a/src/components/structures/SpaceHierarchy.tsx b/src/components/structures/SpaceHierarchy.tsx index 77d85bf55bb..69876b1f650 100644 --- a/src/components/structures/SpaceHierarchy.tsx +++ b/src/components/structures/SpaceHierarchy.tsx @@ -28,11 +28,10 @@ import React, { useRef, useState, } from "react"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent, ClientEvent, MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix"; import { RoomHierarchy } from "matrix-js-sdk/src/room-hierarchy"; import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; import { IHierarchyRelation, IHierarchyRoom } from "matrix-js-sdk/src/@types/spaces"; -import { ClientEvent, MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import { sortBy, uniqBy } from "lodash"; import { GuestAccess, HistoryVisibility } from "matrix-js-sdk/src/@types/partials"; diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index aee94a1d8a4..315e466e419 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -17,7 +17,7 @@ limitations under the License. import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; import { JoinRule, Preset } from "matrix-js-sdk/src/@types/partials"; import { logger } from "matrix-js-sdk/src/logger"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import React, { RefObject, useCallback, useContext, useRef, useState } from "react"; import MatrixClientContext from "../../contexts/MatrixClientContext"; diff --git a/src/components/structures/ThreadPanel.tsx b/src/components/structures/ThreadPanel.tsx index 515094b3d98..2b8f8939b13 100644 --- a/src/components/structures/ThreadPanel.tsx +++ b/src/components/structures/ThreadPanel.tsx @@ -18,7 +18,7 @@ import { Optional } from "matrix-events-sdk"; import React, { useContext, useEffect, useRef, useState } from "react"; import { EventTimelineSet } from "matrix-js-sdk/src/models/event-timeline-set"; import { Thread } from "matrix-js-sdk/src/models/thread"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import BaseCard from "../views/right_panel/BaseCard"; import ResizeNotifier from "../../utils/ResizeNotifier"; diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index f88b34e8bc2..dfc7377e3c1 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -16,7 +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/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { IEventRelation, MatrixEvent } from "matrix-js-sdk/src/models/event"; 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 e70f5ad8d22..388a2e88f32 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { createRef, ReactNode } from "react"; import ReactDOM from "react-dom"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event"; import { EventTimelineSet, IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set"; import { Direction, EventTimeline } from "matrix-js-sdk/src/models/event-timeline"; diff --git a/src/components/structures/UploadBar.tsx b/src/components/structures/UploadBar.tsx index 7b091410d27..9424b23b068 100644 --- a/src/components/structures/UploadBar.tsx +++ b/src/components/structures/UploadBar.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; -import { IEventRelation } from "matrix-js-sdk/src/matrix"; +import { Room, IEventRelation } from "matrix-js-sdk/src/matrix"; import { Optional } from "matrix-events-sdk"; import ContentMessages from "../../ContentMessages"; diff --git a/src/components/structures/UserMenu.tsx b/src/components/structures/UserMenu.tsx index b031274bf82..4004661451f 100644 --- a/src/components/structures/UserMenu.tsx +++ b/src/components/structures/UserMenu.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { createRef, ReactNode } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../../MatrixClientPeg"; import defaultDispatcher from "../../dispatcher/dispatcher"; diff --git a/src/components/views/avatars/DecoratedRoomAvatar.tsx b/src/components/views/avatars/DecoratedRoomAvatar.tsx index 711bacda870..5956200ad49 100644 --- a/src/components/views/avatars/DecoratedRoomAvatar.tsx +++ b/src/components/views/avatars/DecoratedRoomAvatar.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import classNames from "classnames"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } 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"; diff --git a/src/components/views/avatars/RoomAvatar.tsx b/src/components/views/avatars/RoomAvatar.tsx index 691bbed9ff7..09b75e95c2b 100644 --- a/src/components/views/avatars/RoomAvatar.tsx +++ b/src/components/views/avatars/RoomAvatar.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ComponentProps } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import classNames from "classnames"; diff --git a/src/components/views/beacon/RoomCallBanner.tsx b/src/components/views/beacon/RoomCallBanner.tsx index dfbbd6e2fb2..c73355627cd 100644 --- a/src/components/views/beacon/RoomCallBanner.tsx +++ b/src/components/views/beacon/RoomCallBanner.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { useCallback } from "react"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { 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/context_menus/RoomContextMenu.tsx b/src/components/views/context_menus/RoomContextMenu.tsx index a8029d8f84a..883b86f3dae 100644 --- a/src/components/views/context_menus/RoomContextMenu.tsx +++ b/src/components/views/context_menus/RoomContextMenu.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useContext } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { IProps as IContextMenuProps } from "../../structures/ContextMenu"; diff --git a/src/components/views/context_menus/RoomGeneralContextMenu.tsx b/src/components/views/context_menus/RoomGeneralContextMenu.tsx index 0401b20b51c..965a34c8983 100644 --- a/src/components/views/context_menus/RoomGeneralContextMenu.tsx +++ b/src/components/views/context_menus/RoomGeneralContextMenu.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import { logger } from "matrix-js-sdk/src/logger"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import React, { useContext } from "react"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; diff --git a/src/components/views/context_menus/RoomNotificationContextMenu.tsx b/src/components/views/context_menus/RoomNotificationContextMenu.tsx index 54554390397..001e1b3a4ec 100644 --- a/src/components/views/context_menus/RoomNotificationContextMenu.tsx +++ b/src/components/views/context_menus/RoomNotificationContextMenu.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; diff --git a/src/components/views/context_menus/SpaceContextMenu.tsx b/src/components/views/context_menus/SpaceContextMenu.tsx index 6dff155415a..e475c6dd94d 100644 --- a/src/components/views/context_menus/SpaceContextMenu.tsx +++ b/src/components/views/context_menus/SpaceContextMenu.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useContext } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; import { IProps as IContextMenuProps } from "../../structures/ContextMenu"; diff --git a/src/components/views/dialogs/AddExistingSubspaceDialog.tsx b/src/components/views/dialogs/AddExistingSubspaceDialog.tsx index 9212553bf0c..b870280d5b7 100644 --- a/src/components/views/dialogs/AddExistingSubspaceDialog.tsx +++ b/src/components/views/dialogs/AddExistingSubspaceDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import BaseDialog from "./BaseDialog"; diff --git a/src/components/views/dialogs/AddExistingToSpaceDialog.tsx b/src/components/views/dialogs/AddExistingToSpaceDialog.tsx index 38b31edd256..63b97d5e41d 100644 --- a/src/components/views/dialogs/AddExistingToSpaceDialog.tsx +++ b/src/components/views/dialogs/AddExistingToSpaceDialog.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { ReactElement, ReactNode, RefObject, useContext, useMemo, useRef, useState } from "react"; import classNames from "classnames"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { sleep } from "matrix-js-sdk/src/utils"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/dialogs/BulkRedactDialog.tsx b/src/components/views/dialogs/BulkRedactDialog.tsx index 87dbcfda07a..f409ebfa183 100644 --- a/src/components/views/dialogs/BulkRedactDialog.tsx +++ b/src/components/views/dialogs/BulkRedactDialog.tsx @@ -18,7 +18,7 @@ import React, { useState } from "react"; import { logger } from "matrix-js-sdk/src/logger"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } 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"; diff --git a/src/components/views/dialogs/ConfirmSpaceUserActionDialog.tsx b/src/components/views/dialogs/ConfirmSpaceUserActionDialog.tsx index 59597ad66af..dba36668ff9 100644 --- a/src/components/views/dialogs/ConfirmSpaceUserActionDialog.tsx +++ b/src/components/views/dialogs/ConfirmSpaceUserActionDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ComponentProps, useMemo, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import ConfirmUserActionDialog from "./ConfirmUserActionDialog"; import SpaceStore from "../../../stores/spaces/SpaceStore"; diff --git a/src/components/views/dialogs/CreateRoomDialog.tsx b/src/components/views/dialogs/CreateRoomDialog.tsx index d629103d28c..ffdc04f2836 100644 --- a/src/components/views/dialogs/CreateRoomDialog.tsx +++ b/src/components/views/dialogs/CreateRoomDialog.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { ChangeEvent, createRef, KeyboardEvent, SyntheticEvent } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomType } from "matrix-js-sdk/src/@types/event"; import { JoinRule, Preset, Visibility } from "matrix-js-sdk/src/@types/partials"; diff --git a/src/components/views/dialogs/CreateSubspaceDialog.tsx b/src/components/views/dialogs/CreateSubspaceDialog.tsx index ac152f1da66..b3b468d2180 100644 --- a/src/components/views/dialogs/CreateSubspaceDialog.tsx +++ b/src/components/views/dialogs/CreateSubspaceDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useRef, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/dialogs/ForwardDialog.tsx b/src/components/views/dialogs/ForwardDialog.tsx index d1be0219883..5ff2c69c0a7 100644 --- a/src/components/views/dialogs/ForwardDialog.tsx +++ b/src/components/views/dialogs/ForwardDialog.tsx @@ -17,7 +17,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 } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { EventType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index fa81a28bee0..9b7b97ce6e4 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -17,10 +17,9 @@ limitations under the License. import React, { createRef, ReactNode, SyntheticEvent } from "react"; import classNames from "classnames"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixError } from "matrix-js-sdk/src/matrix"; import { MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixError } from "matrix-js-sdk/src/matrix"; import { uniqBy } from "lodash"; import { Icon as InfoIcon } from "../../../../res/img/element-icons/info.svg"; diff --git a/src/components/views/dialogs/LeaveSpaceDialog.tsx b/src/components/views/dialogs/LeaveSpaceDialog.tsx index 83870665eca..061ccea61ec 100644 --- a/src/components/views/dialogs/LeaveSpaceDialog.tsx +++ b/src/components/views/dialogs/LeaveSpaceDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useMemo, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/dialogs/ManageRestrictedJoinRuleDialog.tsx b/src/components/views/dialogs/ManageRestrictedJoinRuleDialog.tsx index a4cefd7fbab..870a997b292 100644 --- a/src/components/views/dialogs/ManageRestrictedJoinRuleDialog.tsx +++ b/src/components/views/dialogs/ManageRestrictedJoinRuleDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useMemo, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import BaseDialog from "./BaseDialog"; diff --git a/src/components/views/dialogs/RoomSettingsDialog.tsx b/src/components/views/dialogs/RoomSettingsDialog.tsx index 86d748730b6..a362b0d1626 100644 --- a/src/components/views/dialogs/RoomSettingsDialog.tsx +++ b/src/components/views/dialogs/RoomSettingsDialog.tsx @@ -18,7 +18,7 @@ limitations under the License. */ import React from "react"; -import { RoomEvent, Room } from "matrix-js-sdk/src/models/room"; +import { RoomEvent, Room } from "matrix-js-sdk/src/matrix"; import TabbedView, { Tab } from "../../structures/TabbedView"; import { _t, _td } from "../../../languageHandler"; diff --git a/src/components/views/dialogs/RoomUpgradeDialog.tsx b/src/components/views/dialogs/RoomUpgradeDialog.tsx index 7737f4fbc79..ce4993c99cf 100644 --- a/src/components/views/dialogs/RoomUpgradeDialog.tsx +++ b/src/components/views/dialogs/RoomUpgradeDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import Modal from "../../../Modal"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index 295074574d9..7de4bed62c8 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import * as React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { User } from "matrix-js-sdk/src/models/user"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; diff --git a/src/components/views/dialogs/SpacePreferencesDialog.tsx b/src/components/views/dialogs/SpacePreferencesDialog.tsx index c0e7e6ea33e..45f60d1449c 100644 --- a/src/components/views/dialogs/SpacePreferencesDialog.tsx +++ b/src/components/views/dialogs/SpacePreferencesDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ChangeEvent } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t, _td } from "../../../languageHandler"; import BaseDialog from "../dialogs/BaseDialog"; diff --git a/src/components/views/dialogs/SpaceSettingsDialog.tsx b/src/components/views/dialogs/SpaceSettingsDialog.tsx index 8683a43f43b..541954f9ee2 100644 --- a/src/components/views/dialogs/SpaceSettingsDialog.tsx +++ b/src/components/views/dialogs/SpaceSettingsDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useMemo } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { _t, _td } from "../../../languageHandler"; diff --git a/src/components/views/dialogs/devtools/BaseTool.tsx b/src/components/views/dialogs/devtools/BaseTool.tsx index 6aa95e138b4..b8e16e4eaad 100644 --- a/src/components/views/dialogs/devtools/BaseTool.tsx +++ b/src/components/views/dialogs/devtools/BaseTool.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { createContext, ReactNode, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import { _t } from "../../../../languageHandler"; diff --git a/src/components/views/dialogs/devtools/RoomNotifications.tsx b/src/components/views/dialogs/devtools/RoomNotifications.tsx index 6aed9125d5d..31f33706d95 100644 --- a/src/components/views/dialogs/devtools/RoomNotifications.tsx +++ b/src/components/views/dialogs/devtools/RoomNotifications.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room"; +import { NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { Thread } from "matrix-js-sdk/src/models/thread"; import React, { useContext } from "react"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; diff --git a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx index 6cd53873915..9e66c3fd88f 100644 --- a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx +++ b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx @@ -18,8 +18,7 @@ import { WebSearch as WebSearchEvent } from "@matrix-org/analytics-events/types/ import classNames from "classnames"; import { capitalize, sum } from "lodash"; import { IHierarchyRoom } from "matrix-js-sdk/src/@types/spaces"; -import { IPublicRoomsChunkRoom, MatrixClient, RoomMember, RoomType } from "matrix-js-sdk/src/matrix"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { IPublicRoomsChunkRoom, MatrixClient, RoomMember, RoomType, Room } from "matrix-js-sdk/src/matrix"; import { normalize } from "matrix-js-sdk/src/utils"; import React, { ChangeEvent, RefObject, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react"; import sanitizeHtml from "sanitize-html"; diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index d6492798eb5..7badebd7051 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -20,7 +20,7 @@ limitations under the License. import React, { ContextType, createRef, CSSProperties, MutableRefObject, ReactNode } from "react"; import classNames from "classnames"; import { IWidget, MatrixCapabilities } from "matrix-widget-api"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { ApprovalOpts, WidgetLifecycle } from "@matrix-org/react-sdk-module-api/lib/lifecycles/WidgetLifecycle"; diff --git a/src/components/views/elements/PersistentApp.tsx b/src/components/views/elements/PersistentApp.tsx index d6ed5d6bf85..b48002bd158 100644 --- a/src/components/views/elements/PersistentApp.tsx +++ b/src/components/views/elements/PersistentApp.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { ContextType, CSSProperties, MutableRefObject } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import WidgetUtils from "../../../utils/WidgetUtils"; import AppTile from "./AppTile"; diff --git a/src/components/views/elements/Pill.tsx b/src/components/views/elements/Pill.tsx index e5e9d383eaf..7e96a21b6f0 100644 --- a/src/components/views/elements/Pill.tsx +++ b/src/components/views/elements/Pill.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { ReactElement, useRef, useState } from "react"; import classNames from "classnames"; -import { Room } from "matrix-js-sdk/src/models/room"; -import { RoomMember } from "matrix-js-sdk/src/matrix"; +import { Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; diff --git a/src/components/views/elements/PollCreateDialog.tsx b/src/components/views/elements/PollCreateDialog.tsx index dbade2d0783..6127dbc8e1c 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/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { KnownPollKind, M_POLL_KIND_DISCLOSED, diff --git a/src/components/views/elements/ReplyChain.tsx b/src/components/views/elements/ReplyChain.tsx index 66b7776b636..ea2f566e180 100644 --- a/src/components/views/elements/ReplyChain.tsx +++ b/src/components/views/elements/ReplyChain.tsx @@ -18,7 +18,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/models/room"; +import { 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/elements/RoomFacePile.tsx b/src/components/views/elements/RoomFacePile.tsx index fc4792c2e0d..b8d9159fe1d 100644 --- a/src/components/views/elements/RoomFacePile.tsx +++ b/src/components/views/elements/RoomFacePile.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { FC, HTMLAttributes, useContext } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { sortBy } from "lodash"; diff --git a/src/components/views/elements/RoomName.tsx b/src/components/views/elements/RoomName.tsx index 8e3353ee003..fc04b2182d4 100644 --- a/src/components/views/elements/RoomName.tsx +++ b/src/components/views/elements/RoomName.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useEffect, useState } from "react"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { useTypedEventEmitter } from "../../../hooks/useEventEmitter"; diff --git a/src/components/views/elements/RoomTopic.tsx b/src/components/views/elements/RoomTopic.tsx index 2cfaa3dfdc5..19ab09afd58 100644 --- a/src/components/views/elements/RoomTopic.tsx +++ b/src/components/views/elements/RoomTopic.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useCallback, useContext, useRef } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import { EventType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/location/LocationShareMenu.tsx b/src/components/views/location/LocationShareMenu.tsx index 3fc369e3d56..8cc3364f24c 100644 --- a/src/components/views/location/LocationShareMenu.tsx +++ b/src/components/views/location/LocationShareMenu.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { SyntheticEvent, useContext, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { IEventRelation } from "matrix-js-sdk/src/models/event"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; diff --git a/src/components/views/pips/WidgetPip.tsx b/src/components/views/pips/WidgetPip.tsx index 0ffdaf3efe1..3001d844a4e 100644 --- a/src/components/views/pips/WidgetPip.tsx +++ b/src/components/views/pips/WidgetPip.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { FC, MutableRefObject, useCallback, useMemo } from "react"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import PersistentApp from "../elements/PersistentApp"; import defaultDispatcher from "../../../dispatcher/dispatcher"; diff --git a/src/components/views/right_panel/LegacyRoomHeaderButtons.tsx b/src/components/views/right_panel/LegacyRoomHeaderButtons.tsx index 693fed6b438..fa9afb1aa07 100644 --- a/src/components/views/right_panel/LegacyRoomHeaderButtons.tsx +++ b/src/components/views/right_panel/LegacyRoomHeaderButtons.tsx @@ -20,7 +20,7 @@ limitations under the License. import React from "react"; import classNames from "classnames"; -import { NotificationCountType, Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { NotificationCountType, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { ThreadEvent } from "matrix-js-sdk/src/models/thread"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/right_panel/PinnedMessagesCard.tsx b/src/components/views/right_panel/PinnedMessagesCard.tsx index 5c43d5e225d..e85b0d5b8a9 100644 --- a/src/components/views/right_panel/PinnedMessagesCard.tsx +++ b/src/components/views/right_panel/PinnedMessagesCard.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useCallback, useContext, useEffect, useState } from "react"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; 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/RoomSummaryCard.tsx b/src/components/views/right_panel/RoomSummaryCard.tsx index acc4662a825..d87c5566a99 100644 --- a/src/components/views/right_panel/RoomSummaryCard.tsx +++ b/src/components/views/right_panel/RoomSummaryCard.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { useCallback, useContext, useEffect, useMemo, useState } from "react"; import classNames from "classnames"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { useIsEncrypted } from "../../../hooks/useIsEncrypted"; diff --git a/src/components/views/right_panel/TimelineCard.tsx b/src/components/views/right_panel/TimelineCard.tsx index 1597499e971..92643287086 100644 --- a/src/components/views/right_panel/TimelineCard.tsx +++ b/src/components/views/right_panel/TimelineCard.tsx @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import { IEventRelation, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { EventTimelineSet } from "matrix-js-sdk/src/models/event-timeline-set"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room"; +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 9a74cc60571..3fbb53cb0d6 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -22,7 +22,7 @@ import classNames from "classnames"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { User } from "matrix-js-sdk/src/models/user"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; 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"; diff --git a/src/components/views/right_panel/WidgetCard.tsx b/src/components/views/right_panel/WidgetCard.tsx index efd814c8d3a..24eb0cfae38 100644 --- a/src/components/views/right_panel/WidgetCard.tsx +++ b/src/components/views/right_panel/WidgetCard.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useContext, useEffect } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import BaseCard from "./BaseCard"; diff --git a/src/components/views/room_settings/UrlPreviewSettings.tsx b/src/components/views/room_settings/UrlPreviewSettings.tsx index 35e0a370610..d0314320f1f 100644 --- a/src/components/views/room_settings/UrlPreviewSettings.tsx +++ b/src/components/views/room_settings/UrlPreviewSettings.tsx @@ -18,7 +18,7 @@ limitations under the License. */ import React, { ReactNode } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t, _td } from "../../../languageHandler"; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/rooms/AppsDrawer.tsx b/src/components/views/rooms/AppsDrawer.tsx index 70e4f78023d..fa92987666e 100644 --- a/src/components/views/rooms/AppsDrawer.tsx +++ b/src/components/views/rooms/AppsDrawer.tsx @@ -18,7 +18,7 @@ limitations under the License. import React from "react"; import classNames from "classnames"; import { Resizable, Size } from "re-resizable"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { IWidget } from "matrix-widget-api"; import AppTile from "../elements/AppTile"; diff --git a/src/components/views/rooms/Autocomplete.tsx b/src/components/views/rooms/Autocomplete.tsx index 667f93afa19..8eedf0867ea 100644 --- a/src/components/views/rooms/Autocomplete.tsx +++ b/src/components/views/rooms/Autocomplete.tsx @@ -18,7 +18,7 @@ limitations under the License. import React, { createRef, KeyboardEvent } from "react"; import classNames from "classnames"; import { flatMap } from "lodash"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import Autocompleter, { ICompletion, ISelectionRange, IProviderCompletions } from "../../../autocomplete/Autocompleter"; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/rooms/AuxPanel.tsx b/src/components/views/rooms/AuxPanel.tsx index 73002f484b1..d4ae64a352c 100644 --- a/src/components/views/rooms/AuxPanel.tsx +++ b/src/components/views/rooms/AuxPanel.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { ReactNode } from "react"; import { lexicographicCompare } from "matrix-js-sdk/src/utils"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { throttle } from "lodash"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index 8f0bd168ad1..317efacd48c 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -16,7 +16,7 @@ limitations under the License. import classNames from "classnames"; import React, { createRef, ClipboardEvent, SyntheticEvent } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; 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 61c6473e1b9..3ed02f62867 100644 --- a/src/components/views/rooms/EditMessageComposer.tsx +++ b/src/components/views/rooms/EditMessageComposer.tsx @@ -18,7 +18,7 @@ import React, { createRef, KeyboardEvent } from "react"; import classNames from "classnames"; import { EventStatus, IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { MsgType } from "matrix-js-sdk/src/@types/event"; -import { Room } from "matrix-js-sdk/src/models/room"; +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 fd6721b3b2c..5ecf099f4e4 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -23,7 +23,7 @@ import { Relations } from "matrix-js-sdk/src/models/relations"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread"; import { logger } from "matrix-js-sdk/src/logger"; -import { NotificationCountType, Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { NotificationCountType, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { CallErrorCode } from "matrix-js-sdk/src/webrtc/call"; import { CryptoEvent } from "matrix-js-sdk/src/crypto"; import { UserTrustLevel } from "matrix-js-sdk/src/crypto/CrossSigning"; diff --git a/src/components/views/rooms/LegacyRoomHeader.tsx b/src/components/views/rooms/LegacyRoomHeader.tsx index 1e4634eef0d..ea7299df217 100644 --- a/src/components/views/rooms/LegacyRoomHeader.tsx +++ b/src/components/views/rooms/LegacyRoomHeader.tsx @@ -23,7 +23,7 @@ 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/models/room"; +import type { 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/MemberList.tsx b/src/components/views/rooms/MemberList.tsx index e8e0403fa08..84b9b83fb22 100644 --- a/src/components/views/rooms/MemberList.tsx +++ b/src/components/views/rooms/MemberList.tsx @@ -19,7 +19,7 @@ limitations under the License. import React from "react"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { RoomMember, RoomMemberEvent } from "matrix-js-sdk/src/models/room-member"; import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { User, UserEvent } from "matrix-js-sdk/src/models/user"; diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx index d51f60bf860..9e88016fe75 100644 --- a/src/components/views/rooms/MessageComposer.tsx +++ b/src/components/views/rooms/MessageComposer.tsx @@ -17,7 +17,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 } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { Optional } from "matrix-events-sdk"; diff --git a/src/components/views/rooms/MessageComposerButtons.tsx b/src/components/views/rooms/MessageComposerButtons.tsx index 864809b5418..5df57682590 100644 --- a/src/components/views/rooms/MessageComposerButtons.tsx +++ b/src/components/views/rooms/MessageComposerButtons.tsx @@ -18,7 +18,7 @@ import classNames from "classnames"; import { IEventRelation } from "matrix-js-sdk/src/models/event"; 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/models/room"; +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/NewRoomIntro.tsx b/src/components/views/rooms/NewRoomIntro.tsx index 84cb408c8ab..0ba8f027a82 100644 --- a/src/components/views/rooms/NewRoomIntro.tsx +++ b/src/components/views/rooms/NewRoomIntro.tsx @@ -17,7 +17,7 @@ limitations under the License. import React, { useContext } from "react"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { User } from "matrix-js-sdk/src/models/user"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; diff --git a/src/components/views/rooms/NotificationBadge/UnreadNotificationBadge.tsx b/src/components/views/rooms/NotificationBadge/UnreadNotificationBadge.tsx index f09c1516909..a937c181cc7 100644 --- a/src/components/views/rooms/NotificationBadge/UnreadNotificationBadge.tsx +++ b/src/components/views/rooms/NotificationBadge/UnreadNotificationBadge.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import { useUnreadNotifications } from "../../../../hooks/useUnreadNotifications"; diff --git a/src/components/views/rooms/RoomBreadcrumbs.tsx b/src/components/views/rooms/RoomBreadcrumbs.tsx index 78fe10133b7..5bbe6202fb7 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.tsx +++ b/src/components/views/rooms/RoomBreadcrumbs.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { CSSTransition } from "react-transition-group"; import { BreadcrumbsStore } from "../../../stores/BreadcrumbsStore"; diff --git a/src/components/views/rooms/RoomHeader.tsx b/src/components/views/rooms/RoomHeader.tsx index c5f187957db..3c78525995e 100644 --- a/src/components/views/rooms/RoomHeader.tsx +++ b/src/components/views/rooms/RoomHeader.tsx @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import { Body as BodyText } from "@vector-im/compound-web"; -import type { Room } from "matrix-js-sdk/src/models/room"; +import type { Room } from "matrix-js-sdk/src/matrix"; import { useRoomName } from "../../../hooks/useRoomName"; import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar"; import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases"; diff --git a/src/components/views/rooms/RoomInfoLine.tsx b/src/components/views/rooms/RoomInfoLine.tsx index 4fb723e0683..eb931804cc7 100644 --- a/src/components/views/rooms/RoomInfoLine.tsx +++ b/src/components/views/rooms/RoomInfoLine.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { FC } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; import { MatrixClient } from "matrix-js-sdk/src/client"; diff --git a/src/components/views/rooms/RoomList.tsx b/src/components/views/rooms/RoomList.tsx index 0d905ccdd23..ffd99fc5eec 100644 --- a/src/components/views/rooms/RoomList.tsx +++ b/src/components/views/rooms/RoomList.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import React, { ComponentType, createRef, ReactComponentElement, SyntheticEvent } from "react"; import { IState as IRovingTabIndexState, RovingTabIndexProvider } from "../../../accessibility/RovingTabIndex"; diff --git a/src/components/views/rooms/RoomListHeader.tsx b/src/components/views/rooms/RoomListHeader.tsx index 31ac1ca69eb..0c41d92ffcf 100644 --- a/src/components/views/rooms/RoomListHeader.tsx +++ b/src/components/views/rooms/RoomListHeader.tsx @@ -16,7 +16,7 @@ limitations under the License. import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; import { ClientEvent } from "matrix-js-sdk/src/client"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import React, { useContext, useEffect, useState } from "react"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; diff --git a/src/components/views/rooms/RoomPreviewBar.tsx b/src/components/views/rooms/RoomPreviewBar.tsx index ee2a5e1b420..3cbd91699bc 100644 --- a/src/components/views/rooms/RoomPreviewBar.tsx +++ b/src/components/views/rooms/RoomPreviewBar.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ReactNode } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixError } from "matrix-js-sdk/src/http-api"; import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; import { IJoinRuleEventContent, JoinRule } from "matrix-js-sdk/src/@types/partials"; diff --git a/src/components/views/rooms/RoomPreviewCard.tsx b/src/components/views/rooms/RoomPreviewCard.tsx index 2714bec93ab..f323a6e075c 100644 --- a/src/components/views/rooms/RoomPreviewCard.tsx +++ b/src/components/views/rooms/RoomPreviewCard.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { FC, useContext, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/rooms/RoomSublist.tsx b/src/components/views/rooms/RoomSublist.tsx index f2e7c181c6b..f149cb2ef85 100644 --- a/src/components/views/rooms/RoomSublist.tsx +++ b/src/components/views/rooms/RoomSublist.tsx @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import { Enable, Resizable } from "re-resizable"; import { Direction } from "re-resizable/lib/resizer"; diff --git a/src/components/views/rooms/RoomTile.tsx b/src/components/views/rooms/RoomTile.tsx index 76f8154c7c5..545a9352944 100644 --- a/src/components/views/rooms/RoomTile.tsx +++ b/src/components/views/rooms/RoomTile.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { createRef } from "react"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import classNames from "classnames"; import type { Call } from "../../../models/Call"; diff --git a/src/components/views/rooms/RoomUpgradeWarningBar.tsx b/src/components/views/rooms/RoomUpgradeWarningBar.tsx index ad4ef674a62..1c7b22090b8 100644 --- a/src/components/views/rooms/RoomUpgradeWarningBar.tsx +++ b/src/components/views/rooms/RoomUpgradeWarningBar.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import Modal from "../../../Modal"; diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index 34a02a3238e..d12e1d75b57 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -20,7 +20,7 @@ import { IContent, MatrixEvent, IEventRelation, IMentions } from "matrix-js-sdk/ 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/models/room"; +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/Stickerpicker.tsx b/src/components/views/rooms/Stickerpicker.tsx index b720f74d1c5..fe51cbf43b5 100644 --- a/src/components/views/rooms/Stickerpicker.tsx +++ b/src/components/views/rooms/Stickerpicker.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { IWidget } from "matrix-widget-api"; import { ClientEvent } from "matrix-js-sdk/src/client"; diff --git a/src/components/views/rooms/ThirdPartyMemberInfo.tsx b/src/components/views/rooms/ThirdPartyMemberInfo.tsx index 9f3fb1e5d3d..d8995c69037 100644 --- a/src/components/views/rooms/ThirdPartyMemberInfo.tsx +++ b/src/components/views/rooms/ThirdPartyMemberInfo.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { EventType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/components/views/rooms/VoiceRecordComposerTile.tsx b/src/components/views/rooms/VoiceRecordComposerTile.tsx index 6e0589868a8..0945c9ba7ac 100644 --- a/src/components/views/rooms/VoiceRecordComposerTile.tsx +++ b/src/components/views/rooms/VoiceRecordComposerTile.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ReactNode } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } 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"; diff --git a/src/components/views/rooms/WhoIsTypingTile.tsx b/src/components/views/rooms/WhoIsTypingTile.tsx index a478204edae..a65d24cc139 100644 --- a/src/components/views/rooms/WhoIsTypingTile.tsx +++ b/src/components/views/rooms/WhoIsTypingTile.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React from "react"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { RoomMember, RoomMemberEvent } from "matrix-js-sdk/src/models/room-member"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { compare } from "matrix-js-sdk/src/utils"; diff --git a/src/components/views/settings/AddPrivilegedUsers.tsx b/src/components/views/settings/AddPrivilegedUsers.tsx index 0aabc49a676..529e67dbca9 100644 --- a/src/components/views/settings/AddPrivilegedUsers.tsx +++ b/src/components/views/settings/AddPrivilegedUsers.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { FormEvent, useCallback, useContext, useRef, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } 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/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 673337f39ba..1642175b007 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -16,7 +16,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/models/room"; +import { 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/JoinRuleSettings.tsx b/src/components/views/settings/JoinRuleSettings.tsx index 34773ec31d9..b35cd9f53fc 100644 --- a/src/components/views/settings/JoinRuleSettings.tsx +++ b/src/components/views/settings/JoinRuleSettings.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { ReactNode } from "react"; import { IJoinRuleEventContent, JoinRule, RestrictedAllowType } from "matrix-js-sdk/src/@types/partials"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import StyledRadioGroup, { IDefinition } from "../elements/StyledRadioGroup"; diff --git a/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx b/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx index fc04d534706..be39d4065d5 100644 --- a/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/BridgeSettingsTab.tsx @@ -15,9 +15,8 @@ limitations under the License. */ import React, { ReactNode } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../../../languageHandler"; import BridgeTile from "../../BridgeTile"; diff --git a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx index e77627323ed..8f085a72526 100644 --- a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx @@ -16,7 +16,7 @@ limitations under the License. import React, { ReactNode } from "react"; import { sleep } from "matrix-js-sdk/src/utils"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { _t } from "../../../../../languageHandler"; diff --git a/src/components/views/spaces/SpaceChildrenPicker.tsx b/src/components/views/spaces/SpaceChildrenPicker.tsx index 4201b7db1a0..0870dd1fe63 100644 --- a/src/components/views/spaces/SpaceChildrenPicker.tsx +++ b/src/components/views/spaces/SpaceChildrenPicker.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useEffect, useMemo, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import StyledRadioGroup from "../elements/StyledRadioGroup"; diff --git a/src/components/views/spaces/SpacePanel.tsx b/src/components/views/spaces/SpacePanel.tsx index 9e7b7bf4893..308b69c6b53 100644 --- a/src/components/views/spaces/SpacePanel.tsx +++ b/src/components/views/spaces/SpacePanel.tsx @@ -28,7 +28,7 @@ import React, { } from "react"; import { DragDropContext, Draggable, Droppable, DroppableProvidedProps } from "react-beautiful-dnd"; import classNames from "classnames"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import { useContextMenu } from "../../structures/ContextMenu"; diff --git a/src/components/views/spaces/SpacePublicShare.tsx b/src/components/views/spaces/SpacePublicShare.tsx index 236161e3f63..a7066dac5cd 100644 --- a/src/components/views/spaces/SpacePublicShare.tsx +++ b/src/components/views/spaces/SpacePublicShare.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { sleep } from "matrix-js-sdk/src/utils"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/spaces/SpaceSettingsGeneralTab.tsx b/src/components/views/spaces/SpaceSettingsGeneralTab.tsx index 78803490644..34a501cd609 100644 --- a/src/components/views/spaces/SpaceSettingsGeneralTab.tsx +++ b/src/components/views/spaces/SpaceSettingsGeneralTab.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx b/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx index d94bc52ee53..8df1e08a52a 100644 --- a/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx +++ b/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/@types/partials"; diff --git a/src/components/views/spaces/SpaceTreeLevel.tsx b/src/components/views/spaces/SpaceTreeLevel.tsx index 926b9048da9..9bf759b08a5 100644 --- a/src/components/views/spaces/SpaceTreeLevel.tsx +++ b/src/components/views/spaces/SpaceTreeLevel.tsx @@ -24,7 +24,7 @@ import React, { RefObject, } from "react"; import classNames from "classnames"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { DraggableProvidedDragHandleProps } from "react-beautiful-dnd"; import RoomAvatar from "../avatars/RoomAvatar"; diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 3f1f3b7d45e..aae17f865fc 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -19,7 +19,7 @@ import classNames from "classnames"; import { logger } from "matrix-js-sdk/src/logger"; import { defer, IDeferred } from "matrix-js-sdk/src/utils"; -import type { Room } from "matrix-js-sdk/src/models/room"; +import type { Room } from "matrix-js-sdk/src/matrix"; import type { ConnectionState } from "../../../models/Call"; import { Call, CallEvent, ElementCall, isConnected } from "../../../models/Call"; import { diff --git a/src/components/views/voip/LegacyCallView/LegacyCallViewHeader.tsx b/src/components/views/voip/LegacyCallView/LegacyCallViewHeader.tsx index 5e18e34616b..aedb8e2d599 100644 --- a/src/components/views/voip/LegacyCallView/LegacyCallViewHeader.tsx +++ b/src/components/views/voip/LegacyCallView/LegacyCallViewHeader.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import { _t } from "../../../../languageHandler"; diff --git a/src/createRoom.ts b/src/createRoom.ts index 555bb98efcf..36adcd27a2f 100644 --- a/src/createRoom.ts +++ b/src/createRoom.ts @@ -15,17 +15,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient, ClientEvent } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; -import { EventType, RoomCreateTypeField, RoomType } from "matrix-js-sdk/src/@types/event"; -import { ICreateRoomOpts } from "matrix-js-sdk/src/@types/requests"; import { + MatrixClient, + ClientEvent, + Room, + EventType, + RoomCreateTypeField, + RoomType, + ICreateRoomOpts, HistoryVisibility, JoinRule, Preset, RestrictedAllowType, Visibility, -} from "matrix-js-sdk/src/@types/partials"; +} from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import Modal, { IHandle } from "./Modal"; diff --git a/src/customisations/RoomList.ts b/src/customisations/RoomList.ts index 758b212aa22..4f9c5a17086 100644 --- a/src/customisations/RoomList.ts +++ b/src/customisations/RoomList.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; // Populate this file with the details of your customisations when copying it. diff --git a/src/dispatcher/payloads/AfterLeaveRoomPayload.ts b/src/dispatcher/payloads/AfterLeaveRoomPayload.ts index 314b266b625..e8b50d35643 100644 --- a/src/dispatcher/payloads/AfterLeaveRoomPayload.ts +++ b/src/dispatcher/payloads/AfterLeaveRoomPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { Action } from "../actions"; import { ActionPayload } from "../payloads"; diff --git a/src/dispatcher/payloads/OpenAddExistingToSpaceDialogPayload.ts b/src/dispatcher/payloads/OpenAddExistingToSpaceDialogPayload.ts index 383677e147d..2e4a8e36b92 100644 --- a/src/dispatcher/payloads/OpenAddExistingToSpaceDialogPayload.ts +++ b/src/dispatcher/payloads/OpenAddExistingToSpaceDialogPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { ActionPayload } from "../payloads"; import { Action } from "../actions"; diff --git a/src/dispatcher/payloads/OpenSpacePreferencesPayload.ts b/src/dispatcher/payloads/OpenSpacePreferencesPayload.ts index 36b340441bc..b694e0ac6bb 100644 --- a/src/dispatcher/payloads/OpenSpacePreferencesPayload.ts +++ b/src/dispatcher/payloads/OpenSpacePreferencesPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { ActionPayload } from "../payloads"; import { Action } from "../actions"; diff --git a/src/dispatcher/payloads/OpenSpaceSettingsPayload.ts b/src/dispatcher/payloads/OpenSpaceSettingsPayload.ts index e366b6a08e1..dd122bd51d3 100644 --- a/src/dispatcher/payloads/OpenSpaceSettingsPayload.ts +++ b/src/dispatcher/payloads/OpenSpaceSettingsPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { ActionPayload } from "../payloads"; import { Action } from "../actions"; diff --git a/src/editor/parts.ts b/src/editor/parts.ts index 4483d04a623..1115958622e 100644 --- a/src/editor/parts.ts +++ b/src/editor/parts.ts @@ -18,7 +18,7 @@ limitations under the License. import EMOJIBASE_REGEX from "emojibase-regex"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import GraphemeSplitter from "graphemer"; import AutocompleteWrapperModel, { GetAutocompleterComponent, UpdateCallback, UpdateQuery } from "./autocomplete"; diff --git a/src/hooks/room/useTopic.ts b/src/hooks/room/useTopic.ts index d6103f2ef64..8ee51473e0e 100644 --- a/src/hooks/room/useTopic.ts +++ b/src/hooks/room/useTopic.ts @@ -17,7 +17,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 } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { parseTopicContent, TopicState } from "matrix-js-sdk/src/content-helpers"; import { MRoomTopicEventContent } from "matrix-js-sdk/src/@types/topic"; diff --git a/src/hooks/useAccountData.ts b/src/hooks/useAccountData.ts index 48161ff279f..37fa3c6ea80 100644 --- a/src/hooks/useAccountData.ts +++ b/src/hooks/useAccountData.ts @@ -17,7 +17,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/models/room"; +import { 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 f8d0150cff6..1dd50b99068 100644 --- a/src/hooks/useIsEncrypted.ts +++ b/src/hooks/useIsEncrypted.ts @@ -17,7 +17,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 } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { EventType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/hooks/useRoomMembers.ts b/src/hooks/useRoomMembers.ts index 6525989f2bd..473bafcab89 100644 --- a/src/hooks/useRoomMembers.ts +++ b/src/hooks/useRoomMembers.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { useState } from "react"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { throttle } from "lodash"; diff --git a/src/hooks/useRoomState.ts b/src/hooks/useRoomState.ts index b0637c2e19c..7714b481197 100644 --- a/src/hooks/useRoomState.ts +++ b/src/hooks/useRoomState.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { useCallback, useEffect, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { useTypedEventEmitter } from "./useEventEmitter"; diff --git a/src/hooks/useSlidingSyncRoomSearch.ts b/src/hooks/useSlidingSyncRoomSearch.ts index 2a9d12d896a..e026b5a06d2 100644 --- a/src/hooks/useSlidingSyncRoomSearch.ts +++ b/src/hooks/useSlidingSyncRoomSearch.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { useCallback, useState } from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../MatrixClientPeg"; import { useLatestResult } from "./useLatestResult"; diff --git a/src/hooks/useUnreadNotifications.ts b/src/hooks/useUnreadNotifications.ts index 8993c24b1f1..791c1c4bc96 100644 --- a/src/hooks/useUnreadNotifications.ts +++ b/src/hooks/useUnreadNotifications.ts @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { RoomEvent } from "matrix-js-sdk/src/models/room"; +import { RoomEvent } from "matrix-js-sdk/src/matrix"; import { useCallback, useEffect, useState } from "react"; -import type { NotificationCount, Room } from "matrix-js-sdk/src/models/room"; +import type { NotificationCount, Room } from "matrix-js-sdk/src/matrix"; import { determineUnreadState } from "../RoomNotifs"; import { NotificationColor } from "../stores/notifications/NotificationColor"; import { useEventEmitter } from "./useEventEmitter"; diff --git a/src/indexing/EventIndex.ts b/src/indexing/EventIndex.ts index 5a24b2ae36d..29bcaebe10e 100644 --- a/src/indexing/EventIndex.ts +++ b/src/indexing/EventIndex.ts @@ -17,7 +17,7 @@ limitations under the License. import { EventEmitter } from "events"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { Direction, EventTimeline } from "matrix-js-sdk/src/models/event-timeline"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { EventTimelineSet, IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set"; import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; diff --git a/src/integrations/IntegrationManagerInstance.ts b/src/integrations/IntegrationManagerInstance.ts index 1e0d9544155..738c4b40156 100644 --- a/src/integrations/IntegrationManagerInstance.ts +++ b/src/integrations/IntegrationManagerInstance.ts @@ -17,7 +17,7 @@ limitations under the License. import { ComponentProps } from "react"; import { logger } from "matrix-js-sdk/src/logger"; -import type { Room } from "matrix-js-sdk/src/models/room"; +import type { Room } from "matrix-js-sdk/src/matrix"; import ScalarAuthClient from "../ScalarAuthClient"; import { dialogTermsInteractionCallback, TermsNotSignedError } from "../Terms"; import Modal from "../Modal"; diff --git a/src/models/Call.ts b/src/models/Call.ts index 48c366e130b..9638737ecf9 100644 --- a/src/models/Call.ts +++ b/src/models/Call.ts @@ -14,11 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { TypedEventEmitter } from "matrix-js-sdk/src/matrix"; +import { TypedEventEmitter, RoomEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { randomString } from "matrix-js-sdk/src/randomstring"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { RoomEvent } from "matrix-js-sdk/src/models/room"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { CallType } from "matrix-js-sdk/src/webrtc/call"; import { NamespacedValue } from "matrix-js-sdk/src/NamespacedValue"; @@ -33,9 +32,7 @@ import { import { EventType } from "matrix-js-sdk/src/@types/event"; import type EventEmitter from "events"; -import type { IMyDevice } from "matrix-js-sdk/src/client"; -import type { Room } from "matrix-js-sdk/src/models/room"; -import type { RoomMember } from "matrix-js-sdk/src/models/room-member"; +import type { Room, IMyDevice, RoomMember } from "matrix-js-sdk/src/matrix"; import type { ClientWidgetApi } from "matrix-widget-api"; import type { IApp } from "../stores/WidgetStore"; import SdkConfig, { DEFAULTS } from "../SdkConfig"; diff --git a/src/settings/handlers/RoomAccountSettingsHandler.ts b/src/settings/handlers/RoomAccountSettingsHandler.ts index 700bc7d3972..7048e3061c8 100644 --- a/src/settings/handlers/RoomAccountSettingsHandler.ts +++ b/src/settings/handlers/RoomAccountSettingsHandler.ts @@ -17,7 +17,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/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { defer } from "matrix-js-sdk/src/utils"; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; diff --git a/src/stores/BreadcrumbsStore.ts b/src/stores/BreadcrumbsStore.ts index 89211f068c4..b7251ef94ef 100644 --- a/src/stores/BreadcrumbsStore.ts +++ b/src/stores/BreadcrumbsStore.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { isNullOrUndefined } from "matrix-js-sdk/src/utils"; import { ClientEvent } from "matrix-js-sdk/src/client"; diff --git a/src/stores/CallStore.ts b/src/stores/CallStore.ts index a24a11e5698..7c2b648a03c 100644 --- a/src/stores/CallStore.ts +++ b/src/stores/CallStore.ts @@ -18,7 +18,7 @@ import { logger } from "matrix-js-sdk/src/logger"; import { GroupCallEventHandlerEvent } from "matrix-js-sdk/src/webrtc/groupCallEventHandler"; import type { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall"; -import type { Room } from "matrix-js-sdk/src/models/room"; +import type { Room } from "matrix-js-sdk/src/matrix"; import defaultDispatcher from "../dispatcher/dispatcher"; import { UPDATE_EVENT } from "./AsyncStore"; import { AsyncStoreWithClient } from "./AsyncStoreWithClient"; diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index a26d2732195..b9effeb6878 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -23,7 +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/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { Optional } from "matrix-events-sdk"; import EventEmitter from "events"; diff --git a/src/stores/VoiceRecordingStore.ts b/src/stores/VoiceRecordingStore.ts index e755596cc41..e8de5fc4d5b 100644 --- a/src/stores/VoiceRecordingStore.ts +++ b/src/stores/VoiceRecordingStore.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { Optional } from "matrix-events-sdk"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RelationType } from "matrix-js-sdk/src/@types/event"; import { IEventRelation } from "matrix-js-sdk/src/models/event"; diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index f58e792f3e9..523644c7f88 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { IWidget } from "matrix-widget-api"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/stores/local-echo/EchoChamber.ts b/src/stores/local-echo/EchoChamber.ts index 7107619e718..9331e0c3381 100644 --- a/src/stores/local-echo/EchoChamber.ts +++ b/src/stores/local-echo/EchoChamber.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomEchoChamber } from "./RoomEchoChamber"; import { EchoStore } from "./EchoStore"; diff --git a/src/stores/local-echo/EchoStore.ts b/src/stores/local-echo/EchoStore.ts index 434f60da182..74be64d12a9 100644 --- a/src/stores/local-echo/EchoStore.ts +++ b/src/stores/local-echo/EchoStore.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { GenericEchoChamber } from "./GenericEchoChamber"; import { RoomEchoChamber } from "./RoomEchoChamber"; diff --git a/src/stores/local-echo/RoomEchoContext.ts b/src/stores/local-echo/RoomEchoContext.ts index 7f8ad7496aa..5e176e40531 100644 --- a/src/stores/local-echo/RoomEchoContext.ts +++ b/src/stores/local-echo/RoomEchoContext.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { EchoContext } from "./EchoContext"; diff --git a/src/stores/notifications/ListNotificationState.ts b/src/stores/notifications/ListNotificationState.ts index a2eabe5e5d4..ca65161472e 100644 --- a/src/stores/notifications/ListNotificationState.ts +++ b/src/stores/notifications/ListNotificationState.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { NotificationColor } from "./NotificationColor"; import { arrayDiff } from "../../utils/arrays"; diff --git a/src/stores/notifications/RoomNotificationState.ts b/src/stores/notifications/RoomNotificationState.ts index d647f5cd1b8..418dce46a32 100644 --- a/src/stores/notifications/RoomNotificationState.ts +++ b/src/stores/notifications/RoomNotificationState.ts @@ -15,10 +15,10 @@ limitations under the License. */ import { MatrixEventEvent } from "matrix-js-sdk/src/models/event"; -import { RoomEvent } from "matrix-js-sdk/src/models/room"; +import { RoomEvent } from "matrix-js-sdk/src/matrix"; import { ClientEvent } from "matrix-js-sdk/src/client"; -import type { Room } from "matrix-js-sdk/src/models/room"; +import type { Room } from "matrix-js-sdk/src/matrix"; import type { MatrixEvent } from "matrix-js-sdk/src/models/event"; import type { IDestroyable } from "../../utils/IDestroyable"; import { MatrixClientPeg } from "../../MatrixClientPeg"; diff --git a/src/stores/notifications/RoomNotificationStateStore.ts b/src/stores/notifications/RoomNotificationStateStore.ts index 66cb0e7c673..f681d9e05ee 100644 --- a/src/stores/notifications/RoomNotificationStateStore.ts +++ b/src/stores/notifications/RoomNotificationStateStore.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { SyncState } from "matrix-js-sdk/src/sync"; import { ClientEvent } from "matrix-js-sdk/src/client"; diff --git a/src/stores/notifications/SpaceNotificationState.ts b/src/stores/notifications/SpaceNotificationState.ts index 28d29ae2296..7c9bfa2e96c 100644 --- a/src/stores/notifications/SpaceNotificationState.ts +++ b/src/stores/notifications/SpaceNotificationState.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { NotificationColor } from "./NotificationColor"; import { arrayDiff } from "../../utils/arrays"; diff --git a/src/stores/right-panel/RightPanelStoreIPanelState.ts b/src/stores/right-panel/RightPanelStoreIPanelState.ts index ddac46a0bc4..739f0ecf81c 100644 --- a/src/stores/right-panel/RightPanelStoreIPanelState.ts +++ b/src/stores/right-panel/RightPanelStoreIPanelState.ts @@ -16,7 +16,7 @@ limitations under the License. import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { User } from "matrix-js-sdk/src/models/user"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { VerificationRequest } from "matrix-js-sdk/src/crypto-api"; diff --git a/src/stores/room-list/Interface.ts b/src/stores/room-list/Interface.ts index 4e30182e94a..79582eeca6e 100644 --- a/src/stores/room-list/Interface.ts +++ b/src/stores/room-list/Interface.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { Room } from "matrix-js-sdk/src/models/room"; +import type { Room } from "matrix-js-sdk/src/matrix"; import type { EventEmitter } from "events"; import { ITagMap, ListAlgorithm, SortAlgorithm } from "./algorithms/models"; import { RoomUpdateCause, TagID } from "./models"; diff --git a/src/stores/room-list/MessagePreviewStore.ts b/src/stores/room-list/MessagePreviewStore.ts index 86be6f7861a..efa79bec1e3 100644 --- a/src/stores/room-list/MessagePreviewStore.ts +++ b/src/stores/room-list/MessagePreviewStore.ts @@ -14,12 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, RelationType } 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"; -import { RelationType } from "matrix-js-sdk/src/matrix"; import { ActionPayload } from "../../dispatcher/payloads"; import { AsyncStoreWithClient } from "../AsyncStoreWithClient"; diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts index e23c60be306..7bb6b98aea7 100644 --- a/src/stores/room-list/RoomListStore.ts +++ b/src/stores/room-list/RoomListStore.ts @@ -15,10 +15,9 @@ limitations under the License. */ import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, RoomState } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { RoomState } from "matrix-js-sdk/src/matrix"; import SettingsStore from "../../settings/SettingsStore"; import { DefaultTagID, OrderedDefaultTagIDs, RoomUpdateCause, TagID } from "./models"; diff --git a/src/stores/room-list/SlidingRoomListStore.ts b/src/stores/room-list/SlidingRoomListStore.ts index 672c0384ca8..77942f6bb35 100644 --- a/src/stores/room-list/SlidingRoomListStore.ts +++ b/src/stores/room-list/SlidingRoomListStore.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { MSC3575Filter, SlidingSyncEvent } from "matrix-js-sdk/src/sliding-sync"; import { Optional } from "matrix-events-sdk"; diff --git a/src/stores/room-list/algorithms/Algorithm.ts b/src/stores/room-list/algorithms/Algorithm.ts index 86b6898a74f..c389ee399ee 100644 --- a/src/stores/room-list/algorithms/Algorithm.ts +++ b/src/stores/room-list/algorithms/Algorithm.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { isNullOrUndefined } from "matrix-js-sdk/src/utils"; import { EventEmitter } from "events"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts index d29d48f7ea0..12548c5d20f 100644 --- a/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts +++ b/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { RoomUpdateCause, TagID } from "../../models"; diff --git a/src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm.ts index 36019599503..23768a243d5 100644 --- a/src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm.ts +++ b/src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { SortAlgorithm } from "../models"; diff --git a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts index 2bcb5b52899..1592eb45977 100644 --- a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts +++ b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { RoomUpdateCause, TagID } from "../../models"; diff --git a/src/stores/room-list/algorithms/models.ts b/src/stores/room-list/algorithms/models.ts index 41152ac9ba6..33584d8c9b8 100644 --- a/src/stores/room-list/algorithms/models.ts +++ b/src/stores/room-list/algorithms/models.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { TagID } from "../models"; import { OrderingAlgorithm } from "./list-ordering/OrderingAlgorithm"; diff --git a/src/stores/room-list/algorithms/tag-sorting/AlphabeticAlgorithm.ts b/src/stores/room-list/algorithms/tag-sorting/AlphabeticAlgorithm.ts index 23f4fb63922..9b2363214ad 100644 --- a/src/stores/room-list/algorithms/tag-sorting/AlphabeticAlgorithm.ts +++ b/src/stores/room-list/algorithms/tag-sorting/AlphabeticAlgorithm.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { compare } from "matrix-js-sdk/src/utils"; import { TagID } from "../../models"; diff --git a/src/stores/room-list/algorithms/tag-sorting/IAlgorithm.ts b/src/stores/room-list/algorithms/tag-sorting/IAlgorithm.ts index 46b18a04f4c..587519dbe46 100644 --- a/src/stores/room-list/algorithms/tag-sorting/IAlgorithm.ts +++ b/src/stores/room-list/algorithms/tag-sorting/IAlgorithm.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { TagID } from "../../models"; diff --git a/src/stores/room-list/algorithms/tag-sorting/ManualAlgorithm.ts b/src/stores/room-list/algorithms/tag-sorting/ManualAlgorithm.ts index 8300aa6618d..2fa2f543fa4 100644 --- a/src/stores/room-list/algorithms/tag-sorting/ManualAlgorithm.ts +++ b/src/stores/room-list/algorithms/tag-sorting/ManualAlgorithm.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { TagID } from "../../models"; import { IAlgorithm } from "./IAlgorithm"; diff --git a/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts b/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts index 15c579312ae..9d42a0514ec 100644 --- a/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts +++ b/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; diff --git a/src/stores/room-list/algorithms/tag-sorting/index.ts b/src/stores/room-list/algorithms/tag-sorting/index.ts index fcd620d60fe..23c70a12a4a 100644 --- a/src/stores/room-list/algorithms/tag-sorting/index.ts +++ b/src/stores/room-list/algorithms/tag-sorting/index.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { SortAlgorithm } from "../models"; import { ManualAlgorithm } from "./ManualAlgorithm"; diff --git a/src/stores/room-list/filters/IFilterCondition.ts b/src/stores/room-list/filters/IFilterCondition.ts index 28a30ae8c09..4684cb9b8b1 100644 --- a/src/stores/room-list/filters/IFilterCondition.ts +++ b/src/stores/room-list/filters/IFilterCondition.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { EventEmitter } from "events"; export const FILTER_CHANGED = "filter_changed"; diff --git a/src/stores/room-list/filters/SpaceFilterCondition.ts b/src/stores/room-list/filters/SpaceFilterCondition.ts index 44ccba9501f..b0318033d6d 100644 --- a/src/stores/room-list/filters/SpaceFilterCondition.ts +++ b/src/stores/room-list/filters/SpaceFilterCondition.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { EventEmitter } from "events"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { FILTER_CHANGED, IFilterCondition } from "./IFilterCondition"; import { IDestroyable } from "../../../utils/IDestroyable"; diff --git a/src/stores/room-list/filters/VisibilityProvider.ts b/src/stores/room-list/filters/VisibilityProvider.ts index 1560c623c09..b263db218c1 100644 --- a/src/stores/room-list/filters/VisibilityProvider.ts +++ b/src/stores/room-list/filters/VisibilityProvider.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import LegacyCallHandler from "../../../LegacyCallHandler"; import { RoomListCustomisations } from "../../../customisations/RoomList"; diff --git a/src/stores/spaces/SpaceStore.ts b/src/stores/spaces/SpaceStore.ts index e853873860f..94b929fba11 100644 --- a/src/stores/spaces/SpaceStore.ts +++ b/src/stores/spaces/SpaceStore.ts @@ -16,7 +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 } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { ClientEvent } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/stores/spaces/index.ts b/src/stores/spaces/index.ts index 0cc4bbab8e1..6e5f325767e 100644 --- a/src/stores/spaces/index.ts +++ b/src/stores/spaces/index.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { IHierarchyRoom } from "matrix-js-sdk/src/@types/spaces"; import { _t } from "../../languageHandler"; diff --git a/src/stores/widgets/StopGapWidget.ts b/src/stores/widgets/StopGapWidget.ts index 6832ac3b9ca..0ba44f3d8bb 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/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { ClientWidgetApi, IModalWidgetOpenRequest, diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 18c04cccccf..71bb807a67a 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -36,10 +36,9 @@ import { 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 } from "matrix-js-sdk/src/models/room"; +import { 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 { Direction } from "matrix-js-sdk/src/matrix"; import { ApprovalOpts, CapabilitiesOpts, diff --git a/src/stores/widgets/WidgetLayoutStore.ts b/src/stores/widgets/WidgetLayoutStore.ts index 1942048a6b0..b5e4fc33655 100644 --- a/src/stores/widgets/WidgetLayoutStore.ts +++ b/src/stores/widgets/WidgetLayoutStore.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { Optional } from "matrix-events-sdk"; diff --git a/src/utils/DMRoomMap.ts b/src/utils/DMRoomMap.ts index d282596b7f2..e2ec501289d 100644 --- a/src/utils/DMRoomMap.ts +++ b/src/utils/DMRoomMap.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { uniq } from "lodash"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } 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"; diff --git a/src/utils/RoomUpgrade.ts b/src/utils/RoomUpgrade.ts index 040bfbd5153..97472acffdd 100644 --- a/src/utils/RoomUpgrade.ts +++ b/src/utils/RoomUpgrade.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; diff --git a/src/utils/ShieldUtils.ts b/src/utils/ShieldUtils.ts index 037084eb676..6baca161ffc 100644 --- a/src/utils/ShieldUtils.ts +++ b/src/utils/ShieldUtils.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import DMRoomMap from "./DMRoomMap"; diff --git a/src/utils/WidgetUtils.ts b/src/utils/WidgetUtils.ts index 6028b647003..256caadf808 100644 --- a/src/utils/WidgetUtils.ts +++ b/src/utils/WidgetUtils.ts @@ -17,10 +17,9 @@ limitations under the License. import { base32 } from "rfc4648"; import { IWidget, IWidgetData } from "matrix-widget-api"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, ClientEvent, MatrixClient, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { logger } from "matrix-js-sdk/src/logger"; -import { ClientEvent, MatrixClient, RoomStateEvent } from "matrix-js-sdk/src/matrix"; 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 52dbe96ac3d..bebc4cec514 100644 --- a/src/utils/exportUtils/Exporter.ts +++ b/src/utils/exportUtils/Exporter.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { 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 323e15a1443..1f7a474d66b 100644 --- a/src/utils/exportUtils/HtmlExport.tsx +++ b/src/utils/exportUtils/HtmlExport.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import ReactDOM from "react-dom"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { renderToStaticMarkup } from "react-dom/server"; import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; diff --git a/src/utils/exportUtils/JSONExport.ts b/src/utils/exportUtils/JSONExport.ts index a78f11caa4b..342dc633ac6 100644 --- a/src/utils/exportUtils/JSONExport.ts +++ b/src/utils/exportUtils/JSONExport.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { IEvent, MatrixEvent } from "matrix-js-sdk/src/models/event"; 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 504ebc442b5..9d447541715 100644 --- a/src/utils/exportUtils/PlainTextExport.ts +++ b/src/utils/exportUtils/PlainTextExport.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { logger } from "matrix-js-sdk/src/logger"; import React from "react"; diff --git a/src/utils/i18n-helpers.ts b/src/utils/i18n-helpers.ts index b2a11aab9a4..1e43741aa9a 100644 --- a/src/utils/i18n-helpers.ts +++ b/src/utils/i18n-helpers.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import SpaceStore from "../stores/spaces/SpaceStore"; import { _t } from "../languageHandler"; diff --git a/src/utils/leave-behaviour.ts b/src/utils/leave-behaviour.ts index 799fbc8f366..094b5ee5155 100644 --- a/src/utils/leave-behaviour.ts +++ b/src/utils/leave-behaviour.ts @@ -18,8 +18,7 @@ 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 } from "matrix-js-sdk/src/models/room"; -import { MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix"; +import { 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 b63864228c1..769d2d7924d 100644 --- a/src/utils/membership.ts +++ b/src/utils/membership.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; diff --git a/src/utils/notifications.ts b/src/utils/notifications.ts index a5c13ebb046..d9415151cb4 100644 --- a/src/utils/notifications.ts +++ b/src/utils/notifications.ts @@ -18,7 +18,7 @@ import { MatrixClient } from "matrix-js-sdk/src/client"; import { LOCAL_NOTIFICATION_SETTINGS_PREFIX } from "matrix-js-sdk/src/@types/event"; import { LocalNotificationSettings } from "matrix-js-sdk/src/@types/local_notifications"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room"; +import { NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import SettingsStore from "../settings/SettingsStore"; diff --git a/src/utils/permalinks/Permalinks.ts b/src/utils/permalinks/Permalinks.ts index 56740e96a41..9569fc216dc 100644 --- a/src/utils/permalinks/Permalinks.ts +++ b/src/utils/permalinks/Permalinks.ts @@ -16,11 +16,10 @@ limitations under the License. import isIp from "is-ip"; import * as utils from "matrix-js-sdk/src/utils"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { EventType } from "matrix-js-sdk/src/@types/event"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; import MatrixToPermalinkConstructor, { baseUrl as matrixtoBaseUrl, diff --git a/src/utils/space.tsx b/src/utils/space.tsx index c2cc9155073..8d0793d8190 100644 --- a/src/utils/space.tsx +++ b/src/utils/space.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, ICreateRoomStateEvent } from "matrix-js-sdk/src/matrix"; import { RoomType, EventType } from "matrix-js-sdk/src/@types/event"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; -import { ICreateRoomStateEvent } from "matrix-js-sdk/src/matrix"; import { calculateRoomVia } from "./permalinks/Permalinks"; import Modal from "../Modal"; diff --git a/src/utils/video-rooms.ts b/src/utils/video-rooms.ts index 6d6fcaccc0d..4e17a396628 100644 --- a/src/utils/video-rooms.ts +++ b/src/utils/video-rooms.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { Room } from "matrix-js-sdk/src/models/room"; +import type { Room } from "matrix-js-sdk/src/matrix"; import SettingsStore from "../settings/SettingsStore"; export const isVideoRoom = (room: Room): boolean => diff --git a/src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts b/src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts index bbf4600f25b..62229ae6dc0 100644 --- a/src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts +++ b/src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { useTypedEventEmitterState } from "../../hooks/useEventEmitter"; diff --git a/src/voice-broadcast/hooks/useVoiceBroadcastRecording.tsx b/src/voice-broadcast/hooks/useVoiceBroadcastRecording.tsx index fe6d00a996f..aba3525c451 100644 --- a/src/voice-broadcast/hooks/useVoiceBroadcastRecording.tsx +++ b/src/voice-broadcast/hooks/useVoiceBroadcastRecording.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import React from "react"; diff --git a/test/Notifier-test.ts b/test/Notifier-test.ts index 206d8b40ebf..a966222a1dc 100644 --- a/test/Notifier-test.ts +++ b/test/Notifier-test.ts @@ -16,11 +16,10 @@ limitations under the License. import { mocked, MockedObject } from "jest-mock"; import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent, EventType, MsgType } from "matrix-js-sdk/src/matrix"; import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { SyncState } from "matrix-js-sdk/src/sync"; import { waitFor } from "@testing-library/react"; -import { EventType, MsgType } from "matrix-js-sdk/src/matrix"; import BasePlatform from "../src/BasePlatform"; import { ElementCall } from "../src/models/Call"; diff --git a/test/RoomNotifs-test.ts b/test/RoomNotifs-test.ts index 505de622bcd..9ca72ac0861 100644 --- a/test/RoomNotifs-test.ts +++ b/test/RoomNotifs-test.ts @@ -16,8 +16,14 @@ limitations under the License. import { mocked } from "jest-mock"; import { PushRuleActionName, TweakName } from "matrix-js-sdk/src/@types/PushRules"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room"; -import { EventStatus, EventType, MatrixEvent, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; +import { + NotificationCountType, + Room, + EventStatus, + EventType, + MatrixEvent, + PendingEventOrdering, +} from "matrix-js-sdk/src/matrix"; import type { MatrixClient } from "matrix-js-sdk/src/matrix"; import { mkEvent, mkRoom, muteRoom, stubClient, upsertRoomStateEvents } from "./test-utils"; diff --git a/test/components/structures/PipContainer-test.tsx b/test/components/structures/PipContainer-test.tsx index a0a21d08ec8..e9102a5a4eb 100644 --- a/test/components/structures/PipContainer-test.tsx +++ b/test/components/structures/PipContainer-test.tsx @@ -19,10 +19,9 @@ import { mocked, Mocked } from "jest-mock"; import { screen, render, act, cleanup } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { Widget, ClientWidgetApi } from "matrix-widget-api"; -import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { UserEvent } from "@testing-library/user-event/dist/types/setup/setup"; import type { RoomMember } from "matrix-js-sdk/src/models/room-member"; diff --git a/test/components/structures/RoomSearchView-test.tsx b/test/components/structures/RoomSearchView-test.tsx index 2d329c52930..2643257ae7b 100644 --- a/test/components/structures/RoomSearchView-test.tsx +++ b/test/components/structures/RoomSearchView-test.tsx @@ -17,13 +17,12 @@ limitations under the License. import React from "react"; import { mocked } from "jest-mock"; import { render, screen } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixClient } 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 { MatrixClient } from "matrix-js-sdk/src/matrix"; import { RoomSearchView } from "../../../src/components/structures/RoomSearchView"; import { SearchScope } from "../../../src/components/views/rooms/SearchBar"; diff --git a/test/components/structures/RoomStatusBar-test.tsx b/test/components/structures/RoomStatusBar-test.tsx index 09525d9136b..0e262e2792e 100644 --- a/test/components/structures/RoomStatusBar-test.tsx +++ b/test/components/structures/RoomStatusBar-test.tsx @@ -18,7 +18,7 @@ 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/models/room"; +import { 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 aab93eefa83..04fce1e91eb 100644 --- a/test/components/structures/RoomView-test.tsx +++ b/test/components/structures/RoomView-test.tsx @@ -17,9 +17,8 @@ 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 } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent, EventType, MatrixError, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { EventType, MatrixError, RoomStateEvent } 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/SpaceHierarchy-test.tsx b/test/components/structures/SpaceHierarchy-test.tsx index 1d41de41ac5..62bef5ba2a6 100644 --- a/test/components/structures/SpaceHierarchy-test.tsx +++ b/test/components/structures/SpaceHierarchy-test.tsx @@ -18,7 +18,7 @@ import React from "react"; import { mocked } from "jest-mock"; import { fireEvent, render, screen, waitFor, waitForElementToBeRemoved } from "@testing-library/react"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomHierarchy } from "matrix-js-sdk/src/room-hierarchy"; import { IHierarchyRoom } from "matrix-js-sdk/src/@types/spaces"; diff --git a/test/components/structures/ThreadView-test.tsx b/test/components/structures/ThreadView-test.tsx index 857137a5f29..d234ff798e5 100644 --- a/test/components/structures/ThreadView-test.tsx +++ b/test/components/structures/ThreadView-test.tsx @@ -20,7 +20,7 @@ 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/models/room"; +import { 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/avatars/MemberAvatar-test.tsx b/test/components/views/avatars/MemberAvatar-test.tsx index 8f98c20f304..aa3a6080231 100644 --- a/test/components/views/avatars/MemberAvatar-test.tsx +++ b/test/components/views/avatars/MemberAvatar-test.tsx @@ -17,7 +17,7 @@ limitations under the License. import { getByTestId, render, waitFor } from "@testing-library/react"; import { mocked } from "jest-mock"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import React, { ComponentProps } from "react"; diff --git a/test/components/views/context_menus/MessageContextMenu-test.tsx b/test/components/views/context_menus/MessageContextMenu-test.tsx index b44350c7812..ffe1222ecd6 100644 --- a/test/components/views/context_menus/MessageContextMenu-test.tsx +++ b/test/components/views/context_menus/MessageContextMenu-test.tsx @@ -17,8 +17,8 @@ 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 { Room } from "matrix-js-sdk/src/models/room"; import { + Room, PendingEventOrdering, BeaconIdentifier, Beacon, diff --git a/test/components/views/context_menus/RoomContextMenu-test.tsx b/test/components/views/context_menus/RoomContextMenu-test.tsx index 4073d458a10..8faed698f50 100644 --- a/test/components/views/context_menus/RoomContextMenu-test.tsx +++ b/test/components/views/context_menus/RoomContextMenu-test.tsx @@ -20,7 +20,7 @@ import { render, screen } from "@testing-library/react"; import React, { ComponentProps } from "react"; import { mocked } from "jest-mock"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; import RoomContextMenu from "../../../../src/components/views/context_menus/RoomContextMenu"; diff --git a/test/components/views/context_menus/RoomGeneralContextMenu-test.tsx b/test/components/views/context_menus/RoomGeneralContextMenu-test.tsx index 598f003289c..d6afe9168c2 100644 --- a/test/components/views/context_menus/RoomGeneralContextMenu-test.tsx +++ b/test/components/views/context_menus/RoomGeneralContextMenu-test.tsx @@ -18,7 +18,7 @@ import { fireEvent, getByLabelText, render, screen } from "@testing-library/reac import { mocked } from "jest-mock"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import userEvent from "@testing-library/user-event"; diff --git a/test/components/views/context_menus/ThreadListContextMenu-test.tsx b/test/components/views/context_menus/ThreadListContextMenu-test.tsx index db6d198808f..4a035f6b946 100644 --- a/test/components/views/context_menus/ThreadListContextMenu-test.tsx +++ b/test/components/views/context_menus/ThreadListContextMenu-test.tsx @@ -19,7 +19,7 @@ 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/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import ThreadListContextMenu, { diff --git a/test/components/views/dialogs/DevtoolsDialog-test.tsx b/test/components/views/dialogs/DevtoolsDialog-test.tsx index 0269826f92d..8da2fc04823 100644 --- a/test/components/views/dialogs/DevtoolsDialog-test.tsx +++ b/test/components/views/dialogs/DevtoolsDialog-test.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { getByLabelText, getAllByLabelText, render } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import userEvent from "@testing-library/user-event"; diff --git a/test/components/views/dialogs/devtools/Event-test.tsx b/test/components/views/dialogs/devtools/Event-test.tsx index ee9d84f29c3..03a57a63a97 100644 --- a/test/components/views/dialogs/devtools/Event-test.tsx +++ b/test/components/views/dialogs/devtools/Event-test.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { render } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { PendingEventOrdering } from "matrix-js-sdk/src/client"; import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; diff --git a/test/components/views/dialogs/devtools/RoomNotifications-test.tsx b/test/components/views/dialogs/devtools/RoomNotifications-test.tsx index 8990026990d..94e846321a2 100644 --- a/test/components/views/dialogs/devtools/RoomNotifications-test.tsx +++ b/test/components/views/dialogs/devtools/RoomNotifications-test.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { render } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { PendingEventOrdering } from "matrix-js-sdk/src/client"; import RoomNotifications from "../../../../../src/components/views/dialogs/devtools/RoomNotifications"; diff --git a/test/components/views/dialogs/spotlight/RoomResultContextMenus-test.tsx b/test/components/views/dialogs/spotlight/RoomResultContextMenus-test.tsx index 0ead500a072..068de66349f 100644 --- a/test/components/views/dialogs/spotlight/RoomResultContextMenus-test.tsx +++ b/test/components/views/dialogs/spotlight/RoomResultContextMenus-test.tsx @@ -18,7 +18,7 @@ limitations under the License. import React from "react"; import { render, screen, RenderResult } from "@testing-library/react"; import { mocked } from "jest-mock"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; import { RoomResultContextMenus } from "../../../../../src/components/views/dialogs/spotlight/RoomResultContextMenus"; diff --git a/test/components/views/elements/AppTile-test.tsx b/test/components/views/elements/AppTile-test.tsx index 5a825b2a8b8..26dc97f41c5 100644 --- a/test/components/views/elements/AppTile-test.tsx +++ b/test/components/views/elements/AppTile-test.tsx @@ -16,12 +16,11 @@ limitations under the License. import React from "react"; import { jest } from "@jest/globals"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { ClientWidgetApi, IWidget, MatrixWidgetType } from "matrix-widget-api"; import { Optional } from "matrix-events-sdk"; import { act, render, RenderResult } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { SpiedFunction } from "jest-mock"; import { ApprovalOpts, diff --git a/test/components/views/elements/PollCreateDialog-test.tsx b/test/components/views/elements/PollCreateDialog-test.tsx index 9f24c316740..dab9a9b9bc6 100644 --- a/test/components/views/elements/PollCreateDialog-test.tsx +++ b/test/components/views/elements/PollCreateDialog-test.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { fireEvent, render, RenderResult } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } 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"; diff --git a/test/components/views/elements/RoomTopic-test.tsx b/test/components/views/elements/RoomTopic-test.tsx index 42f95227571..dc05779794e 100644 --- a/test/components/views/elements/RoomTopic-test.tsx +++ b/test/components/views/elements/RoomTopic-test.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { fireEvent, render, screen } from "@testing-library/react"; import { mkEvent, stubClient } from "../../../test-utils"; diff --git a/test/components/views/messages/CallEvent-test.tsx b/test/components/views/messages/CallEvent-test.tsx index 60b4a0bfc42..a02d4e7b928 100644 --- a/test/components/views/messages/CallEvent-test.tsx +++ b/test/components/views/messages/CallEvent-test.tsx @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import { render, screen, act, cleanup, fireEvent, waitFor } from "@testing-library/react"; import { mocked, Mocked } from "jest-mock"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { ClientWidgetApi, Widget } from "matrix-widget-api"; diff --git a/test/components/views/right_panel/LegacyRoomHeaderButtons-test.tsx b/test/components/views/right_panel/LegacyRoomHeaderButtons-test.tsx index fde3277db6a..fe92bb54e3f 100644 --- a/test/components/views/right_panel/LegacyRoomHeaderButtons-test.tsx +++ b/test/components/views/right_panel/LegacyRoomHeaderButtons-test.tsx @@ -15,9 +15,8 @@ limitations under the License. */ import { render } from "@testing-library/react"; -import { MatrixEvent, MsgType, RelationType } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, MsgType, RelationType, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; import React from "react"; diff --git a/test/components/views/rooms/EventTile-test.tsx b/test/components/views/rooms/EventTile-test.tsx index bb057942659..c4925a33adf 100644 --- a/test/components/views/rooms/EventTile-test.tsx +++ b/test/components/views/rooms/EventTile-test.tsx @@ -19,9 +19,8 @@ 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 } from "matrix-js-sdk/src/matrix"; +import { CryptoApi, TweakName, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room"; 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 a68a98b161a..399d4f8c134 100644 --- a/test/components/views/rooms/LegacyRoomHeader-test.tsx +++ b/test/components/views/rooms/LegacyRoomHeader-test.tsx @@ -18,7 +18,7 @@ import React from "react"; import { render, screen, act, fireEvent, waitFor, getByRole, RenderResult } from "@testing-library/react"; import { mocked, Mocked } from "jest-mock"; import { EventType, RoomType } from "matrix-js-sdk/src/@types/event"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { PendingEventOrdering } from "matrix-js-sdk/src/client"; import { CallType } from "matrix-js-sdk/src/webrtc/call"; diff --git a/test/components/views/rooms/MemberList-test.tsx b/test/components/views/rooms/MemberList-test.tsx index 706818bd3be..3706dfe1e33 100644 --- a/test/components/views/rooms/MemberList-test.tsx +++ b/test/components/views/rooms/MemberList-test.tsx @@ -17,11 +17,10 @@ limitations under the License. import React from "react"; import { act, render, RenderResult } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixClient, RoomState } from "matrix-js-sdk/src/matrix"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { User } from "matrix-js-sdk/src/models/user"; import { compare } from "matrix-js-sdk/src/utils"; -import { MatrixClient, RoomState } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; import * as TestUtils from "../../../test-utils"; diff --git a/test/components/views/rooms/NotificationBadge/UnreadNotificationBadge-test.tsx b/test/components/views/rooms/NotificationBadge/UnreadNotificationBadge-test.tsx index 13285b8d1b8..1b00c1dff64 100644 --- a/test/components/views/rooms/NotificationBadge/UnreadNotificationBadge-test.tsx +++ b/test/components/views/rooms/NotificationBadge/UnreadNotificationBadge-test.tsx @@ -17,9 +17,8 @@ limitations under the License. import React from "react"; import "jest-mock"; import { screen, act, render } from "@testing-library/react"; -import { MatrixEvent, MsgType, RelationType } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, MsgType, RelationType, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room"; import { EventStatus } from "matrix-js-sdk/src/models/event-status"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; diff --git a/test/components/views/rooms/RoomHeader-test.tsx b/test/components/views/rooms/RoomHeader-test.tsx index 1b18128dcf6..54c9c56f45d 100644 --- a/test/components/views/rooms/RoomHeader-test.tsx +++ b/test/components/views/rooms/RoomHeader-test.tsx @@ -16,8 +16,7 @@ limitations under the License. import React from "react"; import { render } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/models/room"; -import { EventType, MatrixEvent, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; +import { Room, EventType, MatrixEvent, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; import userEvent from "@testing-library/user-event"; import { stubClient } from "../../../test-utils"; diff --git a/test/components/views/rooms/RoomList-test.tsx b/test/components/views/rooms/RoomList-test.tsx index 875bac670fc..5e9fd48df99 100644 --- a/test/components/views/rooms/RoomList-test.tsx +++ b/test/components/views/rooms/RoomList-test.tsx @@ -19,7 +19,7 @@ import React, { ComponentProps } from "react"; import { render, screen, within } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import RoomList from "../../../../src/components/views/rooms/RoomList"; import ResizeNotifier from "../../../../src/utils/ResizeNotifier"; diff --git a/test/components/views/rooms/RoomPreviewCard-test.tsx b/test/components/views/rooms/RoomPreviewCard-test.tsx index a2f28e8e877..73cb4ee4153 100644 --- a/test/components/views/rooms/RoomPreviewCard-test.tsx +++ b/test/components/views/rooms/RoomPreviewCard-test.tsx @@ -18,7 +18,7 @@ import React from "react"; import { mocked, Mocked } from "jest-mock"; import { render, screen, act } from "@testing-library/react"; import { PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { RoomType } from "matrix-js-sdk/src/@types/event"; diff --git a/test/components/views/rooms/RoomTile-test.tsx b/test/components/views/rooms/RoomTile-test.tsx index 51f06f00058..fb0e78143a4 100644 --- a/test/components/views/rooms/RoomTile-test.tsx +++ b/test/components/views/rooms/RoomTile-test.tsx @@ -18,10 +18,9 @@ import React from "react"; import { render, screen, act, RenderResult } from "@testing-library/react"; import { mocked, Mocked } from "jest-mock"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { Widget } from "matrix-widget-api"; -import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { Thread } from "matrix-js-sdk/src/models/thread"; import type { RoomMember } from "matrix-js-sdk/src/models/room-member"; diff --git a/test/components/views/rooms/SearchResultTile-test.tsx b/test/components/views/rooms/SearchResultTile-test.tsx index c57aa7971e7..45cb08199f0 100644 --- a/test/components/views/rooms/SearchResultTile-test.tsx +++ b/test/components/views/rooms/SearchResultTile-test.tsx @@ -18,7 +18,7 @@ import * as React from "react"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { render, type RenderResult } from "@testing-library/react"; -import { Room } from "matrix-js-sdk/src/models/room"; +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/AdvancedRoomSettingsTab-test.tsx b/test/components/views/settings/tabs/room/AdvancedRoomSettingsTab-test.tsx index 65d5265b737..4152f168c34 100644 --- a/test/components/views/settings/tabs/room/AdvancedRoomSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/AdvancedRoomSettingsTab-test.tsx @@ -17,9 +17,8 @@ limitations under the License. import React from "react"; import { fireEvent, render, RenderResult, screen } from "@testing-library/react"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room, EventType, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; -import { EventType, MatrixEvent } from "matrix-js-sdk/src/matrix"; import AdvancedRoomSettingsTab from "../../../../../../src/components/views/settings/tabs/room/AdvancedRoomSettingsTab"; import { mkEvent, mkStubRoom, stubClient } from "../../../../../test-utils"; diff --git a/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx b/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx index c9c82ab5470..ca4eece4b34 100644 --- a/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx @@ -19,9 +19,8 @@ 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 } from "matrix-js-sdk/src/models/room"; +import { Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; -import { RoomMember } from "matrix-js-sdk/src/matrix"; import RolesRoomSettingsTab from "../../../../../../src/components/views/settings/tabs/room/RolesRoomSettingsTab"; import { mkStubRoom, withClientContextRenderOptions, stubClient } from "../../../../../test-utils"; diff --git a/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx b/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx index ab7094f333a..1cd920a027a 100644 --- a/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx @@ -17,7 +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/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; 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"; diff --git a/test/components/views/voip/CallView-test.tsx b/test/components/views/voip/CallView-test.tsx index 268a3e72755..e54eb737f97 100644 --- a/test/components/views/voip/CallView-test.tsx +++ b/test/components/views/voip/CallView-test.tsx @@ -19,7 +19,7 @@ import { zip } from "lodash"; import { render, screen, act, fireEvent, waitFor, cleanup } from "@testing-library/react"; import { mocked, Mocked } from "jest-mock"; import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { Widget } from "matrix-widget-api"; diff --git a/test/components/views/voip/VideoFeed-test.tsx b/test/components/views/voip/VideoFeed-test.tsx index 85152437e00..495e591c73f 100644 --- a/test/components/views/voip/VideoFeed-test.tsx +++ b/test/components/views/voip/VideoFeed-test.tsx @@ -19,7 +19,7 @@ import { render, screen } from "@testing-library/react"; import { CallFeed } from "matrix-js-sdk/src/webrtc/callFeed"; import { MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import * as AvatarModule from "../../../../src/Avatar"; import VideoFeed from "../../../../src/components/views/voip/VideoFeed"; diff --git a/test/models/Call-test.ts b/test/models/Call-test.ts index b52dffb050f..084ef650619 100644 --- a/test/models/Call-test.ts +++ b/test/models/Call-test.ts @@ -19,11 +19,10 @@ import { mocked } from "jest-mock"; import { waitFor } from "@testing-library/react"; import { RoomType } from "matrix-js-sdk/src/@types/event"; import { PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room, RoomEvent } from "matrix-js-sdk/src/models/room"; +import { Room, RoomEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { Widget } from "matrix-widget-api"; import { GroupCallIntent } from "matrix-js-sdk/src/webrtc/groupCall"; -import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import type { Mocked } from "jest-mock"; import type { MatrixClient, IMyDevice } from "matrix-js-sdk/src/client"; diff --git a/test/stores/notifications/RoomNotificationState-test.ts b/test/stores/notifications/RoomNotificationState-test.ts index bcd11080e89..ad4e450330a 100644 --- a/test/stores/notifications/RoomNotificationState-test.ts +++ b/test/stores/notifications/RoomNotificationState-test.ts @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/models/room"; import { + Room, MatrixEventEvent, PendingEventOrdering, EventStatus, diff --git a/test/stores/room-list/SpaceWatcher-test.ts b/test/stores/room-list/SpaceWatcher-test.ts index 66afb7f1703..1ffce4c5a0b 100644 --- a/test/stores/room-list/SpaceWatcher-test.ts +++ b/test/stores/room-list/SpaceWatcher-test.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { mocked } from "jest-mock"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { SpaceWatcher } from "../../../src/stores/room-list/SpaceWatcher"; import type { RoomListStoreClass } from "../../../src/stores/room-list/RoomListStore"; diff --git a/test/stores/room-list/algorithms/Algorithm-test.ts b/test/stores/room-list/algorithms/Algorithm-test.ts index 762848a45cc..a3d91b72350 100644 --- a/test/stores/room-list/algorithms/Algorithm-test.ts +++ b/test/stores/room-list/algorithms/Algorithm-test.ts @@ -16,7 +16,7 @@ limitations under the License. import { mocked, MockedObject } from "jest-mock"; import { PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { Widget } from "matrix-widget-api"; diff --git a/test/stores/room-list/algorithms/RecentAlgorithm-test.ts b/test/stores/room-list/algorithms/RecentAlgorithm-test.ts index 7eb71f5b815..a58254ca6e1 100644 --- a/test/stores/room-list/algorithms/RecentAlgorithm-test.ts +++ b/test/stores/room-list/algorithms/RecentAlgorithm-test.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/models/room"; -import { MatrixClient } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { mkMessage, mkRoom, stubClient } from "../../../test-utils"; import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; diff --git a/test/test-utils/call.ts b/test/test-utils/call.ts index 04d9175b5ec..f9c1f40097b 100644 --- a/test/test-utils/call.ts +++ b/test/test-utils/call.ts @@ -17,7 +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 } from "matrix-js-sdk/src/models/room"; +import type { Room } from "matrix-js-sdk/src/matrix"; import type { RoomMember } from "matrix-js-sdk/src/models/room-member"; import type { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { mkEvent } from "./test-utils"; diff --git a/test/toasts/IncomingCallToast-test.tsx b/test/toasts/IncomingCallToast-test.tsx index 413ba4e7f94..626b8270158 100644 --- a/test/toasts/IncomingCallToast-test.tsx +++ b/test/toasts/IncomingCallToast-test.tsx @@ -17,7 +17,7 @@ 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 } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state"; import { ClientWidgetApi, Widget } from "matrix-widget-api"; diff --git a/test/useTopic-test.tsx b/test/useTopic-test.tsx index d1053bc4044..48c5810d1de 100644 --- a/test/useTopic-test.tsx +++ b/test/useTopic-test.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { act, render, screen } from "@testing-library/react"; import { useTopic } from "../src/hooks/room/useTopic"; diff --git a/test/utils/leave-behaviour-test.ts b/test/utils/leave-behaviour-test.ts index 778dbb50236..704fde72c5d 100644 --- a/test/utils/leave-behaviour-test.ts +++ b/test/utils/leave-behaviour-test.ts @@ -16,7 +16,7 @@ limitations under the License. import { mocked, Mocked } from "jest-mock"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/models/room"; +import { Room } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../../src/MatrixClientPeg"; import { mkRoom, resetAsyncStoreWithClient, setupAsyncStoreWithClient, stubClient } from "../test-utils"; diff --git a/test/utils/notifications-test.ts b/test/utils/notifications-test.ts index 58d0fd9b17a..4eade95e21a 100644 --- a/test/utils/notifications-test.ts +++ b/test/utils/notifications-test.ts @@ -17,7 +17,7 @@ limitations under the License. import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { Mocked, mocked } from "jest-mock"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room"; +import { NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; import {