From c28046f81cdc939d72c8985b9acab8b4749219f8 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:08:38 +0100
Subject: [PATCH 01/11] Switch to importing TypedEventEmitter from main js-sdk
export
---
src/Modal.tsx | 2 +-
src/events/RelationsHelper.ts | 3 +--
src/hooks/useEventEmitter.ts | 2 +-
src/models/Call.ts | 2 +-
src/stores/notifications/NotificationState.ts | 2 +-
src/voice-broadcast/audio/VoiceBroadcastRecorder.ts | 2 +-
src/voice-broadcast/models/VoiceBroadcastPlayback.ts | 2 +-
src/voice-broadcast/models/VoiceBroadcastPreRecording.ts | 3 +--
src/voice-broadcast/models/VoiceBroadcastRecording.ts | 2 +-
src/voice-broadcast/stores/VoiceBroadcastPlaybacksStore.ts | 3 +--
src/voice-broadcast/stores/VoiceBroadcastPreRecordingStore.ts | 2 +-
src/voice-broadcast/stores/VoiceBroadcastRecordingsStore.ts | 3 +--
test/components/views/dialogs/IncomingSasDialog-test.tsx | 2 +-
test/components/views/right_panel/VerificationPanel-test.tsx | 3 +--
.../components/views/toasts/VerificationRequestToast-test.tsx | 4 +---
15 files changed, 15 insertions(+), 22 deletions(-)
diff --git a/src/Modal.tsx b/src/Modal.tsx
index bf9564b5f04..801d617d315 100644
--- a/src/Modal.tsx
+++ b/src/Modal.tsx
@@ -19,7 +19,7 @@ import React from "react";
import ReactDOM from "react-dom";
import classNames from "classnames";
import { defer, sleep } from "matrix-js-sdk/src/utils";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import dis from "./dispatcher/dispatcher";
import AsyncWrapper from "./AsyncWrapper";
diff --git a/src/events/RelationsHelper.ts b/src/events/RelationsHelper.ts
index e4db5fc577c..9f48b17c02f 100644
--- a/src/events/RelationsHelper.ts
+++ b/src/events/RelationsHelper.ts
@@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { MatrixClient, MatrixEvent, MatrixEventEvent, RelationType } from "matrix-js-sdk/src/matrix";
+import { MatrixClient, MatrixEvent, MatrixEventEvent, RelationType, TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import { Relations, RelationsEvent } from "matrix-js-sdk/src/models/relations";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
import { IDestroyable } from "../utils/IDestroyable";
diff --git a/src/hooks/useEventEmitter.ts b/src/hooks/useEventEmitter.ts
index 54a5a7a0170..9d6b91794ac 100644
--- a/src/hooks/useEventEmitter.ts
+++ b/src/hooks/useEventEmitter.ts
@@ -15,7 +15,7 @@ limitations under the License.
*/
import { useRef, useEffect, useState, useCallback } from "react";
-import { ListenerMap, TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { ListenerMap, TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import type { EventEmitter } from "events";
diff --git a/src/models/Call.ts b/src/models/Call.ts
index cc0b08466b0..48c366e130b 100644
--- a/src/models/Call.ts
+++ b/src/models/Call.ts
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { TypedEventEmitter } 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";
diff --git a/src/stores/notifications/NotificationState.ts b/src/stores/notifications/NotificationState.ts
index b4db29c1354..63537eb6107 100644
--- a/src/stores/notifications/NotificationState.ts
+++ b/src/stores/notifications/NotificationState.ts
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import { NotificationColor } from "./NotificationColor";
import { IDestroyable } from "../../utils/IDestroyable";
diff --git a/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts b/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts
index ab4daae8304..80241de156b 100644
--- a/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts
+++ b/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts
@@ -17,7 +17,7 @@ limitations under the License.
import { isEqual } from "lodash";
import { Optional } from "matrix-events-sdk";
import { logger } from "matrix-js-sdk/src/logger";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import { getChunkLength } from "..";
import { IRecordingUpdate, VoiceRecording } from "../../audio/VoiceRecording";
diff --git a/src/voice-broadcast/models/VoiceBroadcastPlayback.ts b/src/voice-broadcast/models/VoiceBroadcastPlayback.ts
index cb45d9f29af..77f1a56f8cb 100644
--- a/src/voice-broadcast/models/VoiceBroadcastPlayback.ts
+++ b/src/voice-broadcast/models/VoiceBroadcastPlayback.ts
@@ -21,8 +21,8 @@ import {
MatrixEventEvent,
MsgType,
RelationType,
+ TypedEventEmitter,
} from "matrix-js-sdk/src/matrix";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
import { SimpleObservable } from "matrix-widget-api";
import { logger } from "matrix-js-sdk/src/logger";
import { defer, IDeferred } from "matrix-js-sdk/src/utils";
diff --git a/src/voice-broadcast/models/VoiceBroadcastPreRecording.ts b/src/voice-broadcast/models/VoiceBroadcastPreRecording.ts
index 700bda8b8aa..e1fe2468092 100644
--- a/src/voice-broadcast/models/VoiceBroadcastPreRecording.ts
+++ b/src/voice-broadcast/models/VoiceBroadcastPreRecording.ts
@@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { MatrixClient, Room, RoomMember } from "matrix-js-sdk/src/matrix";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { MatrixClient, Room, RoomMember, TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import { IDestroyable } from "../../utils/IDestroyable";
import { VoiceBroadcastPlaybacksStore } from "../stores/VoiceBroadcastPlaybacksStore";
diff --git a/src/voice-broadcast/models/VoiceBroadcastRecording.ts b/src/voice-broadcast/models/VoiceBroadcastRecording.ts
index db6a14d4e6e..81e07646a9d 100644
--- a/src/voice-broadcast/models/VoiceBroadcastRecording.ts
+++ b/src/voice-broadcast/models/VoiceBroadcastRecording.ts
@@ -24,8 +24,8 @@ import {
MatrixEventEvent,
MsgType,
RelationType,
+ TypedEventEmitter,
} from "matrix-js-sdk/src/matrix";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
import {
ChunkRecordedPayload,
diff --git a/src/voice-broadcast/stores/VoiceBroadcastPlaybacksStore.ts b/src/voice-broadcast/stores/VoiceBroadcastPlaybacksStore.ts
index d76241b7d1d..874a0db45ec 100644
--- a/src/voice-broadcast/stores/VoiceBroadcastPlaybacksStore.ts
+++ b/src/voice-broadcast/stores/VoiceBroadcastPlaybacksStore.ts
@@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { MatrixClient, MatrixEvent, TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import {
VoiceBroadcastPlayback,
diff --git a/src/voice-broadcast/stores/VoiceBroadcastPreRecordingStore.ts b/src/voice-broadcast/stores/VoiceBroadcastPreRecordingStore.ts
index 13fcd831d1d..ce7ab8802bf 100644
--- a/src/voice-broadcast/stores/VoiceBroadcastPreRecordingStore.ts
+++ b/src/voice-broadcast/stores/VoiceBroadcastPreRecordingStore.ts
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import { VoiceBroadcastPreRecording } from "..";
import { IDestroyable } from "../../utils/IDestroyable";
diff --git a/src/voice-broadcast/stores/VoiceBroadcastRecordingsStore.ts b/src/voice-broadcast/stores/VoiceBroadcastRecordingsStore.ts
index b484e6ef3a1..13bbb9ca3ee 100644
--- a/src/voice-broadcast/stores/VoiceBroadcastRecordingsStore.ts
+++ b/src/voice-broadcast/stores/VoiceBroadcastRecordingsStore.ts
@@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { MatrixClient, MatrixEvent, TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import {
VoiceBroadcastInfoState,
diff --git a/test/components/views/dialogs/IncomingSasDialog-test.tsx b/test/components/views/dialogs/IncomingSasDialog-test.tsx
index 7c4962273c9..ee12dfa02d9 100644
--- a/test/components/views/dialogs/IncomingSasDialog-test.tsx
+++ b/test/components/views/dialogs/IncomingSasDialog-test.tsx
@@ -24,7 +24,7 @@ import {
VerifierEvent,
VerifierEventHandlerMap,
} from "matrix-js-sdk/src/crypto-api/verification";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
+import { TypedEventEmitter } from "matrix-js-sdk/src/matrix";
import IncomingSasDialog from "../../../../src/components/views/dialogs/IncomingSasDialog";
import { stubClient } from "../../../test-utils";
diff --git a/test/components/views/right_panel/VerificationPanel-test.tsx b/test/components/views/right_panel/VerificationPanel-test.tsx
index 1dc252c3047..271135d9938 100644
--- a/test/components/views/right_panel/VerificationPanel-test.tsx
+++ b/test/components/views/right_panel/VerificationPanel-test.tsx
@@ -16,7 +16,6 @@ limitations under the License.
import { act, render, waitFor } from "@testing-library/react";
import React, { ComponentProps } from "react";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
import { User } from "matrix-js-sdk/src/models/user";
import { mocked, Mocked } from "jest-mock";
import {
@@ -29,7 +28,7 @@ import {
VerifierEvent,
VerifierEventHandlerMap,
} from "matrix-js-sdk/src/crypto-api/verification";
-import { Device, MatrixClient } from "matrix-js-sdk/src/matrix";
+import { TypedEventEmitter, Device, MatrixClient } from "matrix-js-sdk/src/matrix";
import VerificationPanel from "../../../../src/components/views/right_panel/VerificationPanel";
import { flushPromises, stubClient } from "../../../test-utils";
diff --git a/test/components/views/toasts/VerificationRequestToast-test.tsx b/test/components/views/toasts/VerificationRequestToast-test.tsx
index f5ba06f571a..fe3f7886bd9 100644
--- a/test/components/views/toasts/VerificationRequestToast-test.tsx
+++ b/test/components/views/toasts/VerificationRequestToast-test.tsx
@@ -21,9 +21,7 @@ import {
VerificationRequest,
VerificationRequestEvent,
} from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
-import { IMyDevice, MatrixClient } from "matrix-js-sdk/src/client";
-import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter";
-import { Device } from "matrix-js-sdk/src/matrix";
+import { TypedEventEmitter, IMyDevice, MatrixClient, Device } from "matrix-js-sdk/src/matrix";
import VerificationRequestToast from "../../../../src/components/views/toasts/VerificationRequestToast";
import {
From d722c2e2fea734e5fef6ab03f22615d76cdc07f3 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:13:14 +0100
Subject: [PATCH 02/11] Switch to importing js-sdk/matrix in cypress
---
cypress/e2e/composer/composer.spec.ts | 2 +-
cypress/e2e/editing/editing.spec.ts | 4 +---
cypress/e2e/invite/invite-dialog.spec.ts | 2 +-
cypress/e2e/read-receipts/read-receipts.spec.ts | 3 +--
cypress/e2e/spaces/spaces.spec.ts | 4 +---
cypress/e2e/timeline/timeline.spec.ts | 3 +--
cypress/support/client.ts | 16 +++++++++++-----
7 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/cypress/e2e/composer/composer.spec.ts b/cypress/e2e/composer/composer.spec.ts
index 54e84419878..7e4d2cf986e 100644
--- a/cypress/e2e/composer/composer.spec.ts
+++ b/cypress/e2e/composer/composer.spec.ts
@@ -15,7 +15,7 @@ limitations under the License.
*/
///
-import { EventType } from "matrix-js-sdk/src/@types/event";
+import { EventType } from "matrix-js-sdk/src/matrix";
import { HomeserverInstance } from "../../plugins/utils/homeserver";
import { SettingLevel } from "../../../src/settings/SettingLevel";
diff --git a/cypress/e2e/editing/editing.spec.ts b/cypress/e2e/editing/editing.spec.ts
index d42877e1b05..dafe15c885f 100644
--- a/cypress/e2e/editing/editing.spec.ts
+++ b/cypress/e2e/editing/editing.spec.ts
@@ -16,9 +16,7 @@ limitations under the License.
///
-import type { EventType, MsgType } from "matrix-js-sdk/src/@types/event";
-import type { ISendEventResponse } from "matrix-js-sdk/src/@types/requests";
-import type { IContent } from "matrix-js-sdk/src/models/event";
+import type { EventType, MsgType, ISendEventResponse, IContent } from "matrix-js-sdk/src/matrix";
import { SettingLevel } from "../../../src/settings/SettingLevel";
import { HomeserverInstance } from "../../plugins/utils/homeserver";
import Chainable = Cypress.Chainable;
diff --git a/cypress/e2e/invite/invite-dialog.spec.ts b/cypress/e2e/invite/invite-dialog.spec.ts
index bfc96bc74b1..ba6aa4040d4 100644
--- a/cypress/e2e/invite/invite-dialog.spec.ts
+++ b/cypress/e2e/invite/invite-dialog.spec.ts
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import type { MatrixClient } from "matrix-js-sdk/src/client";
+import type { MatrixClient } from "matrix-js-sdk/src/matrix";
import { HomeserverInstance } from "../../plugins/utils/homeserver";
describe("Invite dialog", function () {
diff --git a/cypress/e2e/read-receipts/read-receipts.spec.ts b/cypress/e2e/read-receipts/read-receipts.spec.ts
index 25334f2a22d..0329b0af73b 100644
--- a/cypress/e2e/read-receipts/read-receipts.spec.ts
+++ b/cypress/e2e/read-receipts/read-receipts.spec.ts
@@ -16,8 +16,7 @@ limitations under the License.
///
-import type { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
-import type { ISendEventResponse } from "matrix-js-sdk/src/@types/requests";
+import type { MatrixClient, MatrixEvent, ISendEventResponse } from "matrix-js-sdk/src/matrix";
import type { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
import { HomeserverInstance } from "../../plugins/utils/homeserver";
diff --git a/cypress/e2e/spaces/spaces.spec.ts b/cypress/e2e/spaces/spaces.spec.ts
index 13fef2a5b5e..c27d6e5ad61 100644
--- a/cypress/e2e/spaces/spaces.spec.ts
+++ b/cypress/e2e/spaces/spaces.spec.ts
@@ -16,9 +16,7 @@ limitations under the License.
///
-import type { MatrixClient } from "matrix-js-sdk/src/client";
-import type { Preset } from "matrix-js-sdk/src/@types/partials";
-import type { ICreateRoomOpts } from "matrix-js-sdk/src/@types/requests";
+import type { MatrixClient, Preset, ICreateRoomOpts } from "matrix-js-sdk/src/matrix";
import { HomeserverInstance } from "../../plugins/utils/homeserver";
import Chainable = Cypress.Chainable;
import { UserCredentials } from "../../support/login";
diff --git a/cypress/e2e/timeline/timeline.spec.ts b/cypress/e2e/timeline/timeline.spec.ts
index 3502655f177..adc6f8dd7a2 100644
--- a/cypress/e2e/timeline/timeline.spec.ts
+++ b/cypress/e2e/timeline/timeline.spec.ts
@@ -16,8 +16,7 @@ limitations under the License.
///
-import type { ISendEventResponse } from "matrix-js-sdk/src/@types/requests";
-import type { EventType, MsgType } from "matrix-js-sdk/src/@types/event";
+import type { ISendEventResponse, EventType, MsgType } from "matrix-js-sdk/src/matrix";
import { HomeserverInstance } from "../../plugins/utils/homeserver";
import { SettingLevel } from "../../../src/settings/SettingLevel";
import { Layout } from "../../../src/settings/enums/Layout";
diff --git a/cypress/support/client.ts b/cypress/support/client.ts
index fca966613e6..ad3c2e239f0 100644
--- a/cypress/support/client.ts
+++ b/cypress/support/client.ts
@@ -16,11 +16,17 @@ limitations under the License.
///
-import type { FileType, Upload, UploadOpts } from "matrix-js-sdk/src/http-api";
-import type { ICreateRoomOpts, ISendEventResponse } from "matrix-js-sdk/src/@types/requests";
-import type { MatrixClient } from "matrix-js-sdk/src/client";
-import type { Room } from "matrix-js-sdk/src/models/room";
-import type { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event";
+import type {
+ MatrixClient,
+ Room,
+ MatrixEvent,
+ IContent,
+ FileType,
+ Upload,
+ UploadOpts,
+ ICreateRoomOpts,
+ ISendEventResponse,
+} from "matrix-js-sdk/src/matrix";
import type { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
import Chainable = Cypress.Chainable;
import { UserCredentials } from "./login";
From 65f546cf3017c6f58563c578362fa0d7b2defb57 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:23:09 +0100
Subject: [PATCH 03/11] Remove duplicated imports
---
.eslintrc.js | 1 +
cypress/support/axe.ts | 3 +--
src/AddThreepid.ts | 3 ++-
src/components/structures/RoomSearchView.tsx | 3 +--
.../structures/WaitingForThirdPartyRoomView.tsx | 3 +--
.../settings/tabs/user/GeneralUserSettingsTab.tsx | 3 +--
src/components/views/voip/DialPadModal.tsx | 3 +--
src/hooks/useCall.ts | 6 ++----
src/modules/ProxiedModuleApi.ts | 3 +--
src/stores/OwnBeaconStore.ts | 2 +-
src/stores/widgets/StopGapWidget.ts | 6 ++----
src/utils/oidc/authorize.ts | 3 +--
test/components/views/messages/MPollBody-test.tsx | 3 +--
.../rooms/EventTile/EventTileThreadToolbar-test.tsx | 3 +--
test/components/views/rooms/LegacyRoomHeader-test.tsx | 2 +-
.../views/rooms/SendMessageComposer-test.tsx | 5 ++---
.../wysiwyg_composer/EditWysiwygComposer-test.tsx | 7 +++----
.../settings/tabs/user/SessionManagerTab-test.tsx | 6 +++---
.../views/spaces/SpaceSettingsVisibilityTab-test.tsx | 9 +++++++--
test/hooks/useUnreadNotifications-test.ts | 3 +--
test/models/Call-test.ts | 11 +++++++++--
.../notifications/RoomNotificationState-test.ts | 2 +-
test/stores/room-list/SpaceWatcher-test.ts | 3 +--
23 files changed, 45 insertions(+), 48 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index f863b7d138e..2f0c70c762c 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -78,6 +78,7 @@ 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/cypress/support/axe.ts b/cypress/support/axe.ts
index 38a297fe182..c30d55b8310 100644
--- a/cypress/support/axe.ts
+++ b/cypress/support/axe.ts
@@ -16,9 +16,8 @@ limitations under the License.
///
-import "cypress-axe";
-import * as axe from "axe-core";
import { Options } from "cypress-axe";
+import * as axe from "axe-core";
import Chainable = Cypress.Chainable;
diff --git a/src/AddThreepid.ts b/src/AddThreepid.ts
index a1567d2256f..2205a9c5606 100644
--- a/src/AddThreepid.ts
+++ b/src/AddThreepid.ts
@@ -22,8 +22,9 @@ import {
IRequestMsisdnTokenResponse,
IRequestTokenResponse,
MatrixClient,
+ MatrixError,
+ HTTPError,
} from "matrix-js-sdk/src/matrix";
-import { MatrixError, HTTPError } from "matrix-js-sdk/src/matrix";
import { IThreepid } from "matrix-js-sdk/src/@types/threepids";
import Modal from "./Modal";
diff --git a/src/components/structures/RoomSearchView.tsx b/src/components/structures/RoomSearchView.tsx
index 3218ff360a8..d2769a8264a 100644
--- a/src/components/structures/RoomSearchView.tsx
+++ b/src/components/structures/RoomSearchView.tsx
@@ -16,10 +16,9 @@ limitations under the License.
import React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from "react";
import { ISearchResults } from "matrix-js-sdk/src/@types/search";
-import { IThreadBundledRelationship } from "matrix-js-sdk/src/models/event";
+import { IThreadBundledRelationship, MatrixEvent } from "matrix-js-sdk/src/models/event";
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
import { logger } from "matrix-js-sdk/src/logger";
-import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import ScrollPanel from "./ScrollPanel";
import { SearchScope } from "../views/rooms/SearchBar";
diff --git a/src/components/structures/WaitingForThirdPartyRoomView.tsx b/src/components/structures/WaitingForThirdPartyRoomView.tsx
index 3967921a2ee..8b1fe716f9d 100644
--- a/src/components/structures/WaitingForThirdPartyRoomView.tsx
+++ b/src/components/structures/WaitingForThirdPartyRoomView.tsx
@@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import React from "react";
+import React, { RefObject } from "react";
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
-import { RefObject } from "react";
import { useRoomContext } from "../../contexts/RoomContext";
import ResizeNotifier from "../../utils/ResizeNotifier";
diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx
index 40b7bae8b7b..be6d8dd56aa 100644
--- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx
+++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx
@@ -20,8 +20,7 @@ import React, { ReactNode } from "react";
import { SERVICE_TYPES } from "matrix-js-sdk/src/service-types";
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
import { logger } from "matrix-js-sdk/src/logger";
-import { IDelegatedAuthConfig, M_AUTHENTICATION } from "matrix-js-sdk/src/matrix";
-import { HTTPError } from "matrix-js-sdk/src/matrix";
+import { IDelegatedAuthConfig, M_AUTHENTICATION, HTTPError } from "matrix-js-sdk/src/matrix";
import { Icon as WarningIcon } from "../../../../../../res/img/feather-customised/warning-triangle.svg";
import { UserFriendlyError, _t } from "../../../../../languageHandler";
diff --git a/src/components/views/voip/DialPadModal.tsx b/src/components/views/voip/DialPadModal.tsx
index 95b38a2fb9f..abed416f343 100644
--- a/src/components/views/voip/DialPadModal.tsx
+++ b/src/components/views/voip/DialPadModal.tsx
@@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import React, { ChangeEvent } from "react";
-import { createRef, SyntheticEvent } from "react";
+import React, { ChangeEvent, createRef, SyntheticEvent } from "react";
import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
import Field from "../elements/Field";
diff --git a/src/hooks/useCall.ts b/src/hooks/useCall.ts
index 03bee56b9cc..bfabeaf9ddd 100644
--- a/src/hooks/useCall.ts
+++ b/src/hooks/useCall.ts
@@ -17,11 +17,9 @@ limitations under the License.
import { useState, useCallback, useMemo } from "react";
import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
-import { Call, ConnectionState, ElementCall, Layout } from "../models/Call";
-import { useTypedEventEmitterState } from "./useEventEmitter";
-import { CallEvent } from "../models/Call";
+import { Call, ConnectionState, ElementCall, Layout, CallEvent } from "../models/Call";
+import { useTypedEventEmitterState, useEventEmitter } from "./useEventEmitter";
import { CallStore, CallStoreEvent } from "../stores/CallStore";
-import { useEventEmitter } from "./useEventEmitter";
import SdkConfig, { DEFAULTS } from "../SdkConfig";
import { _t } from "../languageHandler";
diff --git a/src/modules/ProxiedModuleApi.ts b/src/modules/ProxiedModuleApi.ts
index 0c2b75e71f7..00bfa7164a4 100644
--- a/src/modules/ProxiedModuleApi.ts
+++ b/src/modules/ProxiedModuleApi.ts
@@ -15,12 +15,11 @@ limitations under the License.
*/
import { ModuleApi } from "@matrix-org/react-sdk-module-api/lib/ModuleApi";
-import { TranslationStringsObject } from "@matrix-org/react-sdk-module-api/lib/types/translations";
+import { TranslationStringsObject, PlainSubstitution } from "@matrix-org/react-sdk-module-api/lib/types/translations";
import { Optional } from "matrix-events-sdk";
import { DialogContent, DialogProps } from "@matrix-org/react-sdk-module-api/lib/components/DialogContent";
import React from "react";
import { AccountAuthInfo } from "@matrix-org/react-sdk-module-api/lib/types/AccountAuthInfo";
-import { PlainSubstitution } from "@matrix-org/react-sdk-module-api/lib/types/translations";
import * as Matrix from "matrix-js-sdk/src/matrix";
import { IRegisterRequestParams } from "matrix-js-sdk/src/matrix";
diff --git a/src/stores/OwnBeaconStore.ts b/src/stores/OwnBeaconStore.ts
index ad30cc2caa0..2dcef5554c2 100644
--- a/src/stores/OwnBeaconStore.ts
+++ b/src/stores/OwnBeaconStore.ts
@@ -40,8 +40,8 @@ import {
sortBeaconsByLatestCreation,
TimedGeoUri,
watchPosition,
+ getCurrentPosition,
} from "../utils/beacon";
-import { getCurrentPosition } from "../utils/beacon";
import { doMaybeLocalRoomAction } from "../utils/local-room";
import SettingsStore from "../settings/SettingsStore";
diff --git a/src/stores/widgets/StopGapWidget.ts b/src/stores/widgets/StopGapWidget.ts
index 2781612a0c3..1ffd2179603 100644
--- a/src/stores/widgets/StopGapWidget.ts
+++ b/src/stores/widgets/StopGapWidget.ts
@@ -35,12 +35,11 @@ import {
} from "matrix-widget-api";
import { Optional } from "matrix-events-sdk";
import { EventEmitter } from "events";
-import { MatrixClient } from "matrix-js-sdk/src/client";
+import { MatrixClient, ClientEvent } from "matrix-js-sdk/src/client";
import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event";
import { logger } from "matrix-js-sdk/src/logger";
-import { ClientEvent } from "matrix-js-sdk/src/client";
-import { _t } from "../../languageHandler";
+import { _t, getUserLanguage } from "../../languageHandler";
import { StopGapWidgetDriver } from "./StopGapWidgetDriver";
import { WidgetMessagingStore } from "./WidgetMessagingStore";
import { MatrixClientPeg } from "../../MatrixClientPeg";
@@ -60,7 +59,6 @@ import ThemeWatcher from "../../settings/watchers/ThemeWatcher";
import { getCustomTheme } from "../../theme";
import { ElementWidgetCapabilities } from "./ElementWidgetCapabilities";
import { ELEMENT_CLIENT_ID } from "../../identifiers";
-import { getUserLanguage } from "../../languageHandler";
import { WidgetVariableCustomisations } from "../../customisations/WidgetVariables";
import { arrayFastClone } from "../../utils/arrays";
import { ViewRoomPayload } from "../../dispatcher/payloads/ViewRoomPayload";
diff --git a/src/utils/oidc/authorize.ts b/src/utils/oidc/authorize.ts
index 5a11a7144b1..08a8068d9a0 100644
--- a/src/utils/oidc/authorize.ts
+++ b/src/utils/oidc/authorize.ts
@@ -14,10 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { completeAuthorizationCodeGrant } from "matrix-js-sdk/src/oidc/authorize";
+import { completeAuthorizationCodeGrant, generateOidcAuthorizationUrl } from "matrix-js-sdk/src/oidc/authorize";
import { QueryDict } from "matrix-js-sdk/src/utils";
import { OidcClientConfig } from "matrix-js-sdk/src/autodiscovery";
-import { generateOidcAuthorizationUrl } from "matrix-js-sdk/src/oidc/authorize";
import { randomString } from "matrix-js-sdk/src/randomstring";
/**
diff --git a/test/components/views/messages/MPollBody-test.tsx b/test/components/views/messages/MPollBody-test.tsx
index bc77d90edd2..f103dd707aa 100644
--- a/test/components/views/messages/MPollBody-test.tsx
+++ b/test/components/views/messages/MPollBody-test.tsx
@@ -28,7 +28,7 @@ import {
} from "matrix-js-sdk/src/@types/polls";
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
-import { allVotes, findTopAnswer, isPollEnded } from "../../../../src/components/views/messages/MPollBody";
+import MPollBody, { allVotes, findTopAnswer, isPollEnded } from "../../../../src/components/views/messages/MPollBody";
import { IBodyProps } from "../../../../src/components/views/messages/IBodyProps";
import {
flushPromises,
@@ -38,7 +38,6 @@ import {
setupRoomWithPollEvents,
} from "../../../test-utils";
import MatrixClientContext from "../../../../src/contexts/MatrixClientContext";
-import MPollBody from "../../../../src/components/views/messages/MPollBody";
import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks";
import { MediaEventHelper } from "../../../../src/utils/MediaEventHelper";
diff --git a/test/components/views/rooms/EventTile/EventTileThreadToolbar-test.tsx b/test/components/views/rooms/EventTile/EventTileThreadToolbar-test.tsx
index 8c9bff2f1c2..ef9d798a0ee 100644
--- a/test/components/views/rooms/EventTile/EventTileThreadToolbar-test.tsx
+++ b/test/components/views/rooms/EventTile/EventTileThreadToolbar-test.tsx
@@ -16,8 +16,7 @@ limitations under the License.
import { getByLabelText, render, RenderResult } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
-import React from "react";
-import { ComponentProps } from "react";
+import React, { ComponentProps } from "react";
import { EventTileThreadToolbar } from "../../../../../src/components/views/rooms/EventTile/EventTileThreadToolbar";
diff --git a/test/components/views/rooms/LegacyRoomHeader-test.tsx b/test/components/views/rooms/LegacyRoomHeader-test.tsx
index ea16fe4b122..a68a98b161a 100644
--- a/test/components/views/rooms/LegacyRoomHeader-test.tsx
+++ b/test/components/views/rooms/LegacyRoomHeader-test.tsx
@@ -36,13 +36,13 @@ import {
setupAsyncStoreWithClient,
resetAsyncStoreWithClient,
mockPlatformPeg,
+ mkEvent,
} from "../../../test-utils";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
import DMRoomMap from "../../../../src/utils/DMRoomMap";
import RoomHeader, { IProps as RoomHeaderProps } from "../../../../src/components/views/rooms/LegacyRoomHeader";
import { SearchScope } from "../../../../src/components/views/rooms/SearchBar";
import { E2EStatus } from "../../../../src/utils/ShieldUtils";
-import { mkEvent } from "../../../test-utils";
import { IRoomState } from "../../../../src/components/structures/RoomView";
import RoomContext from "../../../../src/contexts/RoomContext";
import SdkConfig from "../../../../src/SdkConfig";
diff --git a/test/components/views/rooms/SendMessageComposer-test.tsx b/test/components/views/rooms/SendMessageComposer-test.tsx
index 39489b3dd27..50336ad3790 100644
--- a/test/components/views/rooms/SendMessageComposer-test.tsx
+++ b/test/components/views/rooms/SendMessageComposer-test.tsx
@@ -39,7 +39,6 @@ import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalink
import { mockPlatformPeg } from "../../../test-utils/platform";
import { doMaybeLocalRoomAction } from "../../../../src/utils/local-room";
import { addTextToComposer } from "../../../test-utils/composer";
-import dis from "../../../../src/dispatcher/dispatcher";
import SettingsStore from "../../../../src/settings/SettingsStore";
jest.mock("../../../../src/utils/local-room", () => ({
@@ -510,7 +509,7 @@ describe("", () => {
msgtype: MsgType.Text,
});
- expect(dis.dispatch).toHaveBeenCalledWith({ action: `effects.confetti` });
+ expect(defaultDispatcher.dispatch).toHaveBeenCalledWith({ action: `effects.confetti` });
});
it("not to send chat effects on message sending for threads", () => {
@@ -537,7 +536,7 @@ describe("", () => {
msgtype: MsgType.Text,
});
- expect(dis.dispatch).not.toHaveBeenCalledWith({ action: `effects.confetti` });
+ expect(defaultDispatcher.dispatch).not.toHaveBeenCalledWith({ action: `effects.confetti` });
});
});
diff --git a/test/components/views/rooms/wysiwyg_composer/EditWysiwygComposer-test.tsx b/test/components/views/rooms/wysiwyg_composer/EditWysiwygComposer-test.tsx
index 0098859ea22..c3cbcd93e3a 100644
--- a/test/components/views/rooms/wysiwyg_composer/EditWysiwygComposer-test.tsx
+++ b/test/components/views/rooms/wysiwyg_composer/EditWysiwygComposer-test.tsx
@@ -27,7 +27,6 @@ import { EditWysiwygComposer } from "../../../../../src/components/views/rooms/w
import EditorStateTransfer from "../../../../../src/utils/EditorStateTransfer";
import { Emoji } from "../../../../../src/components/views/rooms/wysiwyg_composer/components/Emoji";
import { ChevronFace } from "../../../../../src/components/structures/ContextMenu";
-import dis from "../../../../../src/dispatcher/dispatcher";
import { ComposerInsertPayload, ComposerType } from "../../../../../src/dispatcher/payloads/ComposerInsertPayload";
import { ActionPayload } from "../../../../../src/dispatcher/payloads";
import * as EmojiButton from "../../../../../src/components/views/rooms/EmojiButton";
@@ -290,8 +289,8 @@ describe("EditWysiwygComposer", () => {
// RoomView is re-dispatching the composer messages.
// It adds the composerType fields where the value refers if the composer is in editing or not
// The listeners in the RTE ignore the message if the composerType is missing in the payload
- const dispatcherRef = dis.register((payload: ActionPayload) => {
- dis.dispatch({
+ const dispatcherRef = defaultDispatcher.register((payload: ActionPayload) => {
+ defaultDispatcher.dispatch({
...(payload as ComposerInsertPayload),
composerType: ComposerType.Edit,
});
@@ -301,6 +300,6 @@ describe("EditWysiwygComposer", () => {
// Then
await waitFor(() => expect(screen.getByRole("textbox")).toHaveTextContent(/🦫/));
- dis.unregister(dispatcherRef);
+ defaultDispatcher.unregister(dispatcherRef);
});
});
diff --git a/test/components/views/settings/tabs/user/SessionManagerTab-test.tsx b/test/components/views/settings/tabs/user/SessionManagerTab-test.tsx
index 3de4eff0029..c36dc0d6756 100644
--- a/test/components/views/settings/tabs/user/SessionManagerTab-test.tsx
+++ b/test/components/views/settings/tabs/user/SessionManagerTab-test.tsx
@@ -35,16 +35,16 @@ import {
} from "matrix-js-sdk/src/matrix";
import { mocked } from "jest-mock";
-import { clearAllModals } from "../../../../../test-utils";
-import SessionManagerTab from "../../../../../../src/components/views/settings/tabs/user/SessionManagerTab";
-import MatrixClientContext from "../../../../../../src/contexts/MatrixClientContext";
import {
+ clearAllModals,
flushPromises,
getMockClientWithEventEmitter,
mkPusher,
mockClientMethodsUser,
mockPlatformPeg,
} from "../../../../../test-utils";
+import SessionManagerTab from "../../../../../../src/components/views/settings/tabs/user/SessionManagerTab";
+import MatrixClientContext from "../../../../../../src/contexts/MatrixClientContext";
import Modal from "../../../../../../src/Modal";
import LogoutDialog from "../../../../../../src/components/views/dialogs/LogoutDialog";
import { DeviceSecurityVariation, ExtendedDevice } from "../../../../../../src/components/views/settings/devices/types";
diff --git a/test/components/views/spaces/SpaceSettingsVisibilityTab-test.tsx b/test/components/views/spaces/SpaceSettingsVisibilityTab-test.tsx
index 23eb668d728..9f5a66c84d4 100644
--- a/test/components/views/spaces/SpaceSettingsVisibilityTab-test.tsx
+++ b/test/components/views/spaces/SpaceSettingsVisibilityTab-test.tsx
@@ -22,8 +22,13 @@ import { EventType, MatrixClient, Room } from "matrix-js-sdk/src/matrix";
import { GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/@types/partials";
import _SpaceSettingsVisibilityTab from "../../../../src/components/views/spaces/SpaceSettingsVisibilityTab";
-import { createTestClient, mkEvent, wrapInMatrixClientContext } from "../../../test-utils";
-import { mkSpace, mockStateEventImplementation } from "../../../test-utils";
+import {
+ createTestClient,
+ mkEvent,
+ wrapInMatrixClientContext,
+ mkSpace,
+ mockStateEventImplementation,
+} from "../../../test-utils";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
const SpaceSettingsVisibilityTab = wrapInMatrixClientContext(_SpaceSettingsVisibilityTab);
diff --git a/test/hooks/useUnreadNotifications-test.ts b/test/hooks/useUnreadNotifications-test.ts
index cda9fdf4a56..0bfd83351cc 100644
--- a/test/hooks/useUnreadNotifications-test.ts
+++ b/test/hooks/useUnreadNotifications-test.ts
@@ -15,8 +15,7 @@ limitations under the License.
*/
import { renderHook } from "@testing-library/react-hooks";
-import { EventStatus, NotificationCountType, PendingEventOrdering } from "matrix-js-sdk/src/matrix";
-import { Room } from "matrix-js-sdk/src/matrix";
+import { EventStatus, NotificationCountType, PendingEventOrdering, Room } from "matrix-js-sdk/src/matrix";
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
import { useUnreadNotifications } from "../../src/hooks/useUnreadNotifications";
diff --git a/test/models/Call-test.ts b/test/models/Call-test.ts
index 110121dc2b6..b52dffb050f 100644
--- a/test/models/Call-test.ts
+++ b/test/models/Call-test.ts
@@ -29,11 +29,18 @@ import type { Mocked } from "jest-mock";
import type { MatrixClient, IMyDevice } from "matrix-js-sdk/src/client";
import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
import type { ClientWidgetApi } from "matrix-widget-api";
-import { JitsiCallMemberContent, Layout } from "../../src/models/Call";
+import {
+ JitsiCallMemberContent,
+ Layout,
+ Call,
+ CallEvent,
+ ConnectionState,
+ JitsiCall,
+ ElementCall,
+} from "../../src/models/Call";
import { stubClient, mkEvent, mkRoomMember, setupAsyncStoreWithClient, mockPlatformPeg } from "../test-utils";
import MediaDeviceHandler, { MediaDeviceKindEnum } from "../../src/MediaDeviceHandler";
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
-import { Call, CallEvent, ConnectionState, JitsiCall, ElementCall } from "../../src/models/Call";
import WidgetStore from "../../src/stores/WidgetStore";
import { WidgetMessagingStore } from "../../src/stores/widgets/WidgetMessagingStore";
import ActiveWidgetStore, { ActiveWidgetStoreEvent } from "../../src/stores/ActiveWidgetStore";
diff --git a/test/stores/notifications/RoomNotificationState-test.ts b/test/stores/notifications/RoomNotificationState-test.ts
index 840d2c12d61..bcd11080e89 100644
--- a/test/stores/notifications/RoomNotificationState-test.ts
+++ b/test/stores/notifications/RoomNotificationState-test.ts
@@ -21,8 +21,8 @@ import {
EventStatus,
NotificationCountType,
EventType,
+ MatrixEvent,
} from "matrix-js-sdk/src/matrix";
-import { MatrixEvent } from "matrix-js-sdk/src/matrix";
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
import { mkEvent, muteRoom, stubClient } from "../../test-utils";
diff --git a/test/stores/room-list/SpaceWatcher-test.ts b/test/stores/room-list/SpaceWatcher-test.ts
index 1fa5dc8c08c..66afb7f1703 100644
--- a/test/stores/room-list/SpaceWatcher-test.ts
+++ b/test/stores/room-list/SpaceWatcher-test.ts
@@ -22,9 +22,8 @@ import type { RoomListStoreClass } from "../../../src/stores/room-list/RoomListS
import SettingsStore from "../../../src/settings/SettingsStore";
import SpaceStore from "../../../src/stores/spaces/SpaceStore";
import { MetaSpace, UPDATE_HOME_BEHAVIOUR } from "../../../src/stores/spaces";
-import { stubClient } from "../../test-utils";
+import { stubClient, mkSpace, emitPromise, setupAsyncStoreWithClient } from "../../test-utils";
import { SettingLevel } from "../../../src/settings/SettingLevel";
-import { mkSpace, emitPromise, setupAsyncStoreWithClient } from "../../test-utils";
import { MatrixClientPeg } from "../../../src/MatrixClientPeg";
import { SpaceFilterCondition } from "../../../src/stores/room-list/filters/SpaceFilterCondition";
import DMRoomMap from "../../../src/utils/DMRoomMap";
From 0f3283f96aad9069b8d7edcaf012dcca7b71d2b1 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:24:21 +0100
Subject: [PATCH 04/11] Fix lint:js-fix to run prettier last otherwise ESLint
--fix may cause a mess
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 2effe38ca84..33ba177170a 100644
--- a/package.json
+++ b/package.json
@@ -46,7 +46,7 @@
"start:build": "babel src -w -s -d lib --verbose --extensions \".ts,.js\"",
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
"lint:js": "eslint --max-warnings 0 src test cypress && prettier --check .",
- "lint:js-fix": "prettier --loglevel=warn --write . && eslint --fix src test cypress",
+ "lint:js-fix": "eslint --fix src test cypress && prettier --loglevel=warn --write .",
"lint:types": "tsc --noEmit --jsx react && tsc --noEmit --jsx react -p cypress",
"lint:style": "stylelint \"res/css/**/*.pcss\"",
"test": "jest",
From 2f862a0c42b5f242ac46bdda6f324d2086bfb9a3 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:25:22 +0100
Subject: [PATCH 05/11] Add lint rule
---
.eslintrc.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.eslintrc.js b/.eslintrc.js
index 2f0c70c762c..c7b74244556 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -61,6 +61,10 @@ module.exports = {
name: "matrix-js-sdk/src/index",
message: "Please use matrix-js-sdk/src/matrix instead",
},
+ {
+ name: "matrix-js-sdk/src/models/typed-event-emitter",
+ message: "Please use matrix-js-sdk/src/matrix instead",
+ },
{
name: "matrix-react-sdk",
message: "Please use matrix-react-sdk/src/index instead",
From 4e1122c6b6d36057fc0cbd040c8ef4c5596c4be6 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:30:52 +0100
Subject: [PATCH 06/11] Switch to importing models/Room from main js-sdk export
---
.eslintrc.js | 6 +++++-
src/autocomplete/CommandProvider.tsx | 2 +-
src/autocomplete/EmojiProvider.tsx | 2 +-
src/autocomplete/NotifProvider.tsx | 2 +-
src/autocomplete/RoomProvider.tsx | 2 +-
src/autocomplete/SpaceProvider.tsx | 2 +-
src/autocomplete/UserProvider.tsx | 2 +-
src/components/structures/FilePanel.tsx | 2 +-
src/components/structures/MessagePanel.tsx | 3 +--
src/components/structures/RightPanel.tsx | 2 +-
src/components/structures/RoomStatusBar.tsx | 3 +--
src/components/structures/RoomView.tsx | 2 +-
src/components/structures/SpaceHierarchy.tsx | 3 +--
src/components/structures/SpaceRoomView.tsx | 2 +-
src/components/structures/ThreadPanel.tsx | 2 +-
src/components/structures/ThreadView.tsx | 2 +-
src/components/structures/TimelinePanel.tsx | 2 +-
src/components/structures/UploadBar.tsx | 3 +--
src/components/structures/UserMenu.tsx | 2 +-
src/components/views/avatars/DecoratedRoomAvatar.tsx | 2 +-
src/components/views/avatars/RoomAvatar.tsx | 2 +-
src/components/views/beacon/RoomCallBanner.tsx | 2 +-
src/components/views/context_menus/RoomContextMenu.tsx | 2 +-
.../views/context_menus/RoomGeneralContextMenu.tsx | 2 +-
.../context_menus/RoomNotificationContextMenu.tsx | 2 +-
.../views/context_menus/SpaceContextMenu.tsx | 2 +-
.../views/dialogs/AddExistingSubspaceDialog.tsx | 2 +-
.../views/dialogs/AddExistingToSpaceDialog.tsx | 2 +-
src/components/views/dialogs/BulkRedactDialog.tsx | 2 +-
.../views/dialogs/ConfirmSpaceUserActionDialog.tsx | 2 +-
src/components/views/dialogs/CreateRoomDialog.tsx | 2 +-
src/components/views/dialogs/CreateSubspaceDialog.tsx | 2 +-
src/components/views/dialogs/ForwardDialog.tsx | 2 +-
src/components/views/dialogs/InviteDialog.tsx | 3 +--
src/components/views/dialogs/LeaveSpaceDialog.tsx | 2 +-
.../views/dialogs/ManageRestrictedJoinRuleDialog.tsx | 2 +-
src/components/views/dialogs/RoomSettingsDialog.tsx | 2 +-
src/components/views/dialogs/RoomUpgradeDialog.tsx | 2 +-
src/components/views/dialogs/ShareDialog.tsx | 2 +-
.../views/dialogs/SpacePreferencesDialog.tsx | 2 +-
src/components/views/dialogs/SpaceSettingsDialog.tsx | 2 +-
src/components/views/dialogs/devtools/BaseTool.tsx | 2 +-
.../views/dialogs/devtools/RoomNotifications.tsx | 2 +-
.../views/dialogs/spotlight/SpotlightDialog.tsx | 3 +--
src/components/views/elements/AppTile.tsx | 2 +-
src/components/views/elements/PersistentApp.tsx | 2 +-
src/components/views/elements/Pill.tsx | 3 +--
src/components/views/elements/PollCreateDialog.tsx | 2 +-
src/components/views/elements/ReplyChain.tsx | 2 +-
src/components/views/elements/RoomFacePile.tsx | 2 +-
src/components/views/elements/RoomName.tsx | 2 +-
src/components/views/elements/RoomTopic.tsx | 2 +-
src/components/views/location/LocationShareMenu.tsx | 2 +-
src/components/views/pips/WidgetPip.tsx | 2 +-
.../views/right_panel/LegacyRoomHeaderButtons.tsx | 2 +-
.../views/right_panel/PinnedMessagesCard.tsx | 2 +-
src/components/views/right_panel/RoomSummaryCard.tsx | 2 +-
src/components/views/right_panel/TimelineCard.tsx | 2 +-
src/components/views/right_panel/UserInfo.tsx | 2 +-
src/components/views/right_panel/WidgetCard.tsx | 2 +-
.../views/room_settings/UrlPreviewSettings.tsx | 2 +-
src/components/views/rooms/AppsDrawer.tsx | 2 +-
src/components/views/rooms/Autocomplete.tsx | 2 +-
src/components/views/rooms/AuxPanel.tsx | 2 +-
src/components/views/rooms/BasicMessageComposer.tsx | 2 +-
src/components/views/rooms/EditMessageComposer.tsx | 2 +-
src/components/views/rooms/EventTile.tsx | 2 +-
src/components/views/rooms/LegacyRoomHeader.tsx | 2 +-
src/components/views/rooms/MemberList.tsx | 2 +-
src/components/views/rooms/MessageComposer.tsx | 2 +-
src/components/views/rooms/MessageComposerButtons.tsx | 2 +-
src/components/views/rooms/NewRoomIntro.tsx | 2 +-
.../NotificationBadge/UnreadNotificationBadge.tsx | 2 +-
src/components/views/rooms/RoomBreadcrumbs.tsx | 2 +-
src/components/views/rooms/RoomHeader.tsx | 2 +-
src/components/views/rooms/RoomInfoLine.tsx | 2 +-
src/components/views/rooms/RoomList.tsx | 2 +-
src/components/views/rooms/RoomListHeader.tsx | 2 +-
src/components/views/rooms/RoomPreviewBar.tsx | 2 +-
src/components/views/rooms/RoomPreviewCard.tsx | 2 +-
src/components/views/rooms/RoomSublist.tsx | 2 +-
src/components/views/rooms/RoomTile.tsx | 2 +-
src/components/views/rooms/RoomUpgradeWarningBar.tsx | 2 +-
src/components/views/rooms/SendMessageComposer.tsx | 2 +-
src/components/views/rooms/Stickerpicker.tsx | 2 +-
src/components/views/rooms/ThirdPartyMemberInfo.tsx | 2 +-
src/components/views/rooms/VoiceRecordComposerTile.tsx | 2 +-
src/components/views/rooms/WhoIsTypingTile.tsx | 2 +-
src/components/views/settings/AddPrivilegedUsers.tsx | 2 +-
src/components/views/settings/BridgeTile.tsx | 2 +-
src/components/views/settings/JoinRuleSettings.tsx | 2 +-
.../views/settings/tabs/room/BridgeSettingsTab.tsx | 3 +--
.../settings/tabs/user/SecurityUserSettingsTab.tsx | 2 +-
src/components/views/spaces/SpaceChildrenPicker.tsx | 2 +-
src/components/views/spaces/SpacePanel.tsx | 2 +-
src/components/views/spaces/SpacePublicShare.tsx | 2 +-
.../views/spaces/SpaceSettingsGeneralTab.tsx | 2 +-
.../views/spaces/SpaceSettingsVisibilityTab.tsx | 2 +-
src/components/views/spaces/SpaceTreeLevel.tsx | 2 +-
src/components/views/voip/CallView.tsx | 2 +-
.../views/voip/LegacyCallView/LegacyCallViewHeader.tsx | 2 +-
src/customisations/RoomList.ts | 2 +-
src/dispatcher/payloads/AfterLeaveRoomPayload.ts | 2 +-
.../payloads/OpenAddExistingToSpaceDialogPayload.ts | 2 +-
src/dispatcher/payloads/OpenSpacePreferencesPayload.ts | 2 +-
src/dispatcher/payloads/OpenSpaceSettingsPayload.ts | 2 +-
src/editor/parts.ts | 2 +-
src/hooks/room/useTopic.ts | 2 +-
src/hooks/useAccountData.ts | 2 +-
src/hooks/useIsEncrypted.ts | 2 +-
src/hooks/useRoomMembers.ts | 2 +-
src/hooks/useRoomState.ts | 2 +-
src/hooks/useSlidingSyncRoomSearch.ts | 2 +-
src/hooks/useUnreadNotifications.ts | 4 ++--
src/indexing/EventIndex.ts | 2 +-
src/integrations/IntegrationManagerInstance.ts | 2 +-
src/models/Call.ts | 5 ++---
src/settings/handlers/RoomAccountSettingsHandler.ts | 2 +-
src/stores/BreadcrumbsStore.ts | 2 +-
src/stores/CallStore.ts | 2 +-
src/stores/RoomViewStore.tsx | 2 +-
src/stores/VoiceRecordingStore.ts | 2 +-
src/stores/WidgetStore.ts | 2 +-
src/stores/local-echo/EchoChamber.ts | 2 +-
src/stores/local-echo/EchoStore.ts | 2 +-
src/stores/local-echo/RoomEchoContext.ts | 2 +-
src/stores/notifications/ListNotificationState.ts | 2 +-
src/stores/notifications/RoomNotificationState.ts | 4 ++--
src/stores/notifications/RoomNotificationStateStore.ts | 2 +-
src/stores/notifications/SpaceNotificationState.ts | 2 +-
src/stores/right-panel/RightPanelStoreIPanelState.ts | 2 +-
src/stores/room-list/Interface.ts | 2 +-
src/stores/room-list/MessagePreviewStore.ts | 3 +--
src/stores/room-list/RoomListStore.ts | 3 +--
src/stores/room-list/SlidingRoomListStore.ts | 2 +-
src/stores/room-list/algorithms/Algorithm.ts | 2 +-
.../algorithms/list-ordering/ImportanceAlgorithm.ts | 2 +-
.../algorithms/list-ordering/NaturalAlgorithm.ts | 2 +-
.../algorithms/list-ordering/OrderingAlgorithm.ts | 2 +-
src/stores/room-list/algorithms/models.ts | 2 +-
.../algorithms/tag-sorting/AlphabeticAlgorithm.ts | 2 +-
.../room-list/algorithms/tag-sorting/IAlgorithm.ts | 2 +-
.../algorithms/tag-sorting/ManualAlgorithm.ts | 2 +-
.../algorithms/tag-sorting/RecentAlgorithm.ts | 2 +-
src/stores/room-list/algorithms/tag-sorting/index.ts | 2 +-
src/stores/room-list/filters/IFilterCondition.ts | 2 +-
src/stores/room-list/filters/SpaceFilterCondition.ts | 2 +-
src/stores/room-list/filters/VisibilityProvider.ts | 2 +-
src/stores/spaces/SpaceStore.ts | 2 +-
src/stores/spaces/index.ts | 2 +-
src/stores/widgets/StopGapWidget.ts | 2 +-
src/stores/widgets/StopGapWidgetDriver.ts | 3 +--
src/stores/widgets/WidgetLayoutStore.ts | 2 +-
src/utils/DMRoomMap.ts | 2 +-
src/utils/RoomUpgrade.ts | 2 +-
src/utils/ShieldUtils.ts | 2 +-
src/utils/WidgetUtils.ts | 3 +--
src/utils/exportUtils/Exporter.ts | 2 +-
src/utils/exportUtils/HtmlExport.tsx | 2 +-
src/utils/exportUtils/JSONExport.ts | 2 +-
src/utils/exportUtils/PlainTextExport.ts | 2 +-
src/utils/i18n-helpers.ts | 2 +-
src/utils/leave-behaviour.ts | 3 +--
src/utils/membership.ts | 2 +-
src/utils/notifications.ts | 2 +-
src/utils/permalinks/Permalinks.ts | 3 +--
src/utils/space.tsx | 3 +--
src/utils/video-rooms.ts | 2 +-
src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts | 2 +-
.../hooks/useVoiceBroadcastRecording.tsx | 2 +-
test/Notifier-test.ts | 3 +--
test/RoomNotifs-test.ts | 10 ++++++++--
test/components/structures/PipContainer-test.tsx | 3 +--
test/components/structures/RoomSearchView-test.tsx | 3 +--
test/components/structures/RoomStatusBar-test.tsx | 2 +-
test/components/structures/RoomView-test.tsx | 3 +--
test/components/structures/SpaceHierarchy-test.tsx | 2 +-
test/components/structures/ThreadView-test.tsx | 2 +-
test/components/views/avatars/MemberAvatar-test.tsx | 2 +-
.../views/context_menus/MessageContextMenu-test.tsx | 2 +-
.../views/context_menus/RoomContextMenu-test.tsx | 2 +-
.../context_menus/RoomGeneralContextMenu-test.tsx | 2 +-
.../views/context_menus/ThreadListContextMenu-test.tsx | 2 +-
test/components/views/dialogs/DevtoolsDialog-test.tsx | 2 +-
test/components/views/dialogs/devtools/Event-test.tsx | 2 +-
.../views/dialogs/devtools/RoomNotifications-test.tsx | 2 +-
.../dialogs/spotlight/RoomResultContextMenus-test.tsx | 2 +-
test/components/views/elements/AppTile-test.tsx | 3 +--
.../views/elements/PollCreateDialog-test.tsx | 2 +-
test/components/views/elements/RoomTopic-test.tsx | 2 +-
test/components/views/messages/CallEvent-test.tsx | 2 +-
.../views/right_panel/LegacyRoomHeaderButtons-test.tsx | 3 +--
test/components/views/rooms/EventTile-test.tsx | 3 +--
test/components/views/rooms/LegacyRoomHeader-test.tsx | 2 +-
test/components/views/rooms/MemberList-test.tsx | 3 +--
.../NotificationBadge/UnreadNotificationBadge-test.tsx | 3 +--
test/components/views/rooms/RoomHeader-test.tsx | 3 +--
test/components/views/rooms/RoomList-test.tsx | 2 +-
test/components/views/rooms/RoomPreviewCard-test.tsx | 2 +-
test/components/views/rooms/RoomTile-test.tsx | 3 +--
test/components/views/rooms/SearchResultTile-test.tsx | 2 +-
.../tabs/room/AdvancedRoomSettingsTab-test.tsx | 3 +--
.../settings/tabs/room/RolesRoomSettingsTab-test.tsx | 3 +--
.../settings/tabs/room/VoipRoomSettingsTab-test.tsx | 2 +-
test/components/views/voip/CallView-test.tsx | 2 +-
test/components/views/voip/VideoFeed-test.tsx | 2 +-
test/models/Call-test.ts | 3 +--
.../stores/notifications/RoomNotificationState-test.ts | 2 +-
test/stores/room-list/SpaceWatcher-test.ts | 2 +-
test/stores/room-list/algorithms/Algorithm-test.ts | 2 +-
.../room-list/algorithms/RecentAlgorithm-test.ts | 3 +--
test/test-utils/call.ts | 2 +-
test/toasts/IncomingCallToast-test.tsx | 2 +-
test/useTopic-test.tsx | 2 +-
test/utils/leave-behaviour-test.ts | 2 +-
test/utils/notifications-test.ts | 2 +-
216 files changed, 230 insertions(+), 251 deletions(-)
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/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 2c1125e56d3..ef3f41a720f 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/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..69b9ccf6cdd 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";
@@ -34,7 +33,7 @@ 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 { Room } from "matrix-js-sdk/src/matrix";
import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
import type { ClientWidgetApi } from "matrix-widget-api";
import type { IApp } from "../stores/WidgetStore";
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 1ffd2179603..710c2cdbee6 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 {
From 6ff760a95b8bfeaac0bb119ec68070e172fb2228 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:33:39 +0100
Subject: [PATCH 07/11] Switch to importing models/room-state &
models/room-member from main js-sdk export
---
.eslintrc.js | 8 ++++++++
src/autocomplete/UserProvider.tsx | 4 +---
src/components/structures/LoggedInView.tsx | 3 +--
src/components/structures/MessagePanel.tsx | 3 +--
src/components/structures/RightPanel.tsx | 4 +---
src/components/structures/RoomView.tsx | 10 ++++++++--
src/components/structures/TimelinePanel.tsx | 3 +--
src/components/structures/UserView.tsx | 3 +--
src/components/views/avatars/MemberAvatar.tsx | 2 +-
src/components/views/avatars/RoomAvatar.tsx | 3 +--
.../views/context_menus/MessageContextMenu.tsx | 2 +-
src/components/views/dialogs/BulkRedactDialog.tsx | 3 +--
.../views/dialogs/ConfirmUserActionDialog.tsx | 2 +-
src/components/views/dialogs/ForwardDialog.tsx | 3 +--
src/components/views/dialogs/InviteDialog.tsx | 3 +--
src/components/views/dialogs/ShareDialog.tsx | 3 +--
src/components/views/elements/AppPermission.tsx | 2 +-
src/components/views/elements/EventListSummary.tsx | 2 +-
src/components/views/elements/EventTilePreview.tsx | 2 +-
src/components/views/elements/FacePile.tsx | 2 +-
.../views/elements/GenericEventListSummary.tsx | 2 +-
src/components/views/elements/RoomFacePile.tsx | 3 +--
src/components/views/location/LocationButton.tsx | 2 +-
src/components/views/location/LocationPicker.tsx | 2 +-
src/components/views/messages/CallEvent.tsx | 2 +-
src/components/views/messages/DisambiguatedProfile.tsx | 2 +-
src/components/views/right_panel/EncryptionInfo.tsx | 2 +-
src/components/views/right_panel/EncryptionPanel.tsx | 2 +-
.../views/right_panel/PinnedMessagesCard.tsx | 3 +--
src/components/views/right_panel/UserInfo.tsx | 4 +---
src/components/views/right_panel/VerificationPanel.tsx | 3 +--
src/components/views/rooms/AuxPanel.tsx | 3 +--
src/components/views/rooms/EventTile.tsx | 3 +--
src/components/views/rooms/LegacyRoomHeader.tsx | 2 +-
src/components/views/rooms/MemberList.tsx | 4 +---
src/components/views/rooms/MemberTile.tsx | 3 +--
src/components/views/rooms/MessageComposer.tsx | 3 +--
src/components/views/rooms/ReadReceiptMarker.tsx | 2 +-
src/components/views/rooms/RoomPreviewBar.tsx | 3 +--
src/components/views/rooms/RoomUpgradeWarningBar.tsx | 3 +--
src/components/views/rooms/ThirdPartyMemberInfo.tsx | 3 +--
src/components/views/rooms/WhoIsTypingTile.tsx | 3 +--
.../views/settings/tabs/room/RolesRoomSettingsTab.tsx | 4 +---
.../settings/tabs/room/SecurityRoomSettingsTab.tsx | 3 +--
.../views/settings/tabs/room/VoipRoomSettingsTab.tsx | 3 +--
src/dispatcher/payloads/ViewUserPayload.ts | 2 +-
src/editor/parts.ts | 3 +--
src/hooks/room/useRoomMemberProfile.ts | 2 +-
src/hooks/room/useTopic.ts | 3 +--
src/hooks/useCall.ts | 2 +-
src/hooks/useIsEncrypted.ts | 3 +--
src/hooks/useRoomMembers.ts | 4 +---
src/hooks/useRoomState.ts | 3 +--
src/indexing/EventIndex.ts | 4 +---
src/mjolnir/Mjolnir.ts | 2 +-
src/models/Call.ts | 6 ++----
src/settings/handlers/RoomSettingsHandler.ts | 2 +-
src/stores/ActiveWidgetStore.ts | 3 +--
src/stores/OwnProfileStore.ts | 3 +--
src/stores/WidgetStore.ts | 3 +--
src/stores/right-panel/RightPanelStoreIPanelState.ts | 3 +--
src/stores/spaces/SpaceStore.ts | 4 +---
src/stores/widgets/WidgetLayoutStore.ts | 3 +--
src/utils/membership.ts | 4 +---
src/utils/permalinks/Permalinks.ts | 3 +--
src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts | 3 +--
.../hooks/useVoiceBroadcastRecording.tsx | 3 +--
test/components/structures/PipContainer-test.tsx | 5 ++---
test/components/views/avatars/MemberAvatar-test.tsx | 3 +--
test/components/views/location/LocationPicker-test.tsx | 2 +-
.../views/location/LocationShareMenu-test.tsx | 3 +--
test/components/views/messages/CallEvent-test.tsx | 5 ++---
.../views/right_panel/PinnedMessagesCard-test.tsx | 3 +--
test/components/views/rooms/LegacyRoomHeader-test.tsx | 5 ++---
test/components/views/rooms/MemberList-test.tsx | 3 +--
test/components/views/rooms/RoomPreviewCard-test.tsx | 5 ++---
test/components/views/rooms/RoomTile-test.tsx | 5 ++---
test/components/views/voip/CallView-test.tsx | 5 ++---
test/models/Call-test.ts | 5 ++---
test/stores/SpaceStore-test.ts | 4 +---
test/stores/right-panel/RightPanelStore-test.ts | 2 +-
test/stores/room-list/algorithms/Algorithm-test.ts | 3 +--
test/test-utils/call.ts | 3 +--
test/toasts/IncomingCallToast-test.tsx | 5 ++---
84 files changed, 107 insertions(+), 163 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index 08f8b735794..88414ebd82b 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -70,6 +70,14 @@ module.exports = {
name: "matrix-js-sdk/src/models/room",
message: "Please use matrix-js-sdk/src/matrix instead",
},
+ {
+ name: "matrix-js-sdk/src/models/room-member",
+ message: "Please use matrix-js-sdk/src/matrix instead",
+ },
+ {
+ name: "matrix-js-sdk/src/models/room-state",
+ message: "Please use matrix-js-sdk/src/matrix instead",
+ },
{
name: "matrix-react-sdk",
message: "Please use matrix-react-sdk/src/index instead",
diff --git a/src/autocomplete/UserProvider.tsx b/src/autocomplete/UserProvider.tsx
index 04ae3828df2..c81695e42df 100644
--- a/src/autocomplete/UserProvider.tsx
+++ b/src/autocomplete/UserProvider.tsx
@@ -20,9 +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/matrix";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
-import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomEvent, RoomMember, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { IRoomTimelineData } from "matrix-js-sdk/src/models/event-timeline-set";
import { MatrixClientPeg } from "../MatrixClientPeg";
diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx
index e4fc4dee8ea..b86a6d44e81 100644
--- a/src/components/structures/LoggedInView.tsx
+++ b/src/components/structures/LoggedInView.tsx
@@ -21,8 +21,7 @@ import { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
import classNames from "classnames";
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
import { IUsageLimit } from "matrix-js-sdk/src/@types/partials";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
-import { MatrixError } from "matrix-js-sdk/src/matrix";
+import { RoomStateEvent, MatrixError } from "matrix-js-sdk/src/matrix";
import { isOnlyCtrlOrCmdKeyEvent, Key } from "../../Keyboard";
import PageTypes from "../../PageTypes";
diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx
index 70e281d2957..3c1880031aa 100644
--- a/src/components/structures/MessagePanel.tsx
+++ b/src/components/structures/MessagePanel.tsx
@@ -17,11 +17,10 @@ limitations under the License.
import React, { createRef, ReactNode, TransitionEvent } from "react";
import ReactDOM from "react-dom";
import classNames from "classnames";
-import { Room, MatrixClient } from "matrix-js-sdk/src/matrix";
+import { Room, MatrixClient, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event";
import { logger } from "matrix-js-sdk/src/logger";
-import { 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";
diff --git a/src/components/structures/RightPanel.tsx b/src/components/structures/RightPanel.tsx
index db551422795..5b2482890d9 100644
--- a/src/components/structures/RightPanel.tsx
+++ b/src/components/structures/RightPanel.tsx
@@ -16,9 +16,7 @@ limitations under the License.
*/
import React from "react";
-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 { Room, RoomState, RoomStateEvent, RoomMember } from "matrix-js-sdk/src/matrix";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { throttle } from "lodash";
diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx
index 97475833400..2d575389a33 100644
--- a/src/components/structures/RoomView.tsx
+++ b/src/components/structures/RoomView.tsx
@@ -19,12 +19,18 @@ 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/matrix";
+import {
+ IRecommendedVersion,
+ NotificationCountType,
+ Room,
+ RoomEvent,
+ RoomState,
+ RoomStateEvent,
+} from "matrix-js-sdk/src/matrix";
import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event";
import { logger } from "matrix-js-sdk/src/logger";
import { EventTimeline } from "matrix-js-sdk/src/models/event-timeline";
import { EventType } from "matrix-js-sdk/src/@types/event";
-import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
import { CallState, MatrixCall } from "matrix-js-sdk/src/webrtc/call";
import { throttle } from "lodash";
import { MatrixError } from "matrix-js-sdk/src/http-api";
diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx
index 388a2e88f32..dad80c4cefd 100644
--- a/src/components/structures/TimelinePanel.tsx
+++ b/src/components/structures/TimelinePanel.tsx
@@ -16,14 +16,13 @@ limitations under the License.
import React, { createRef, ReactNode } from "react";
import ReactDOM from "react-dom";
-import { Room, RoomEvent } from "matrix-js-sdk/src/matrix";
+import { Room, RoomEvent, RoomMember, RoomMemberEvent } 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";
import { TimelineWindow } from "matrix-js-sdk/src/timeline-window";
import { EventType, RelationType } from "matrix-js-sdk/src/@types/event";
import { SyncState } from "matrix-js-sdk/src/sync";
-import { RoomMember, RoomMemberEvent } from "matrix-js-sdk/src/models/room-member";
import { debounce, findLastIndex, throttle } from "lodash";
import { logger } from "matrix-js-sdk/src/logger";
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";
diff --git a/src/components/structures/UserView.tsx b/src/components/structures/UserView.tsx
index 84e5552e602..3b76572e2fd 100644
--- a/src/components/structures/UserView.tsx
+++ b/src/components/structures/UserView.tsx
@@ -17,8 +17,7 @@ limitations under the License.
import React from "react";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
-import { MatrixClient } from "matrix-js-sdk/src/matrix";
+import { RoomMember, MatrixClient } from "matrix-js-sdk/src/matrix";
import Modal from "../../Modal";
import { _t } from "../../languageHandler";
diff --git a/src/components/views/avatars/MemberAvatar.tsx b/src/components/views/avatars/MemberAvatar.tsx
index 12b84fe0a6c..715981a70c3 100644
--- a/src/components/views/avatars/MemberAvatar.tsx
+++ b/src/components/views/avatars/MemberAvatar.tsx
@@ -16,7 +16,7 @@ limitations under the License.
*/
import React, { ReactNode, useContext } from "react";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { ResizeMethod } from "matrix-js-sdk/src/@types/partials";
import dis from "../../../dispatcher/dispatcher";
diff --git a/src/components/views/avatars/RoomAvatar.tsx b/src/components/views/avatars/RoomAvatar.tsx
index 09b75e95c2b..44232277a7f 100644
--- a/src/components/views/avatars/RoomAvatar.tsx
+++ b/src/components/views/avatars/RoomAvatar.tsx
@@ -15,9 +15,8 @@ limitations under the License.
*/
import React, { ComponentProps } from "react";
-import { Room } from "matrix-js-sdk/src/matrix";
+import { Room, RoomStateEvent } 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";
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";
diff --git a/src/components/views/context_menus/MessageContextMenu.tsx b/src/components/views/context_menus/MessageContextMenu.tsx
index ea5170c38a2..7b14509bb9b 100644
--- a/src/components/views/context_menus/MessageContextMenu.tsx
+++ b/src/components/views/context_menus/MessageContextMenu.tsx
@@ -20,7 +20,7 @@ import React, { createRef, useContext } from "react";
import { EventStatus, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event";
import { EventType, RelationType } from "matrix-js-sdk/src/@types/event";
import { Relations } from "matrix-js-sdk/src/models/relations";
-import { RoomMemberEvent } from "matrix-js-sdk/src/models/room-member";
+import { RoomMemberEvent } from "matrix-js-sdk/src/matrix";
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
import { Thread } from "matrix-js-sdk/src/models/thread";
diff --git a/src/components/views/dialogs/BulkRedactDialog.tsx b/src/components/views/dialogs/BulkRedactDialog.tsx
index f409ebfa183..0b572651415 100644
--- a/src/components/views/dialogs/BulkRedactDialog.tsx
+++ b/src/components/views/dialogs/BulkRedactDialog.tsx
@@ -17,8 +17,7 @@ limitations under the License.
import React, { useState } from "react";
import { logger } from "matrix-js-sdk/src/logger";
import { MatrixClient } from "matrix-js-sdk/src/client";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
-import { Room } from "matrix-js-sdk/src/matrix";
+import { RoomMember, 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/ConfirmUserActionDialog.tsx b/src/components/views/dialogs/ConfirmUserActionDialog.tsx
index 2fa684eda84..7c941728bdb 100644
--- a/src/components/views/dialogs/ConfirmUserActionDialog.tsx
+++ b/src/components/views/dialogs/ConfirmUserActionDialog.tsx
@@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { ChangeEvent, FormEvent, ReactNode } from "react";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import classNames from "classnames";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/dialogs/ForwardDialog.tsx b/src/components/views/dialogs/ForwardDialog.tsx
index 5ff2c69c0a7..1eabbdef452 100644
--- a/src/components/views/dialogs/ForwardDialog.tsx
+++ b/src/components/views/dialogs/ForwardDialog.tsx
@@ -17,9 +17,8 @@ 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/matrix";
+import { Room, RoomMember } 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";
import { ILocationContent, LocationAssetType, M_TIMESTAMP } from "matrix-js-sdk/src/@types/location";
import { makeLocationContent } from "matrix-js-sdk/src/content-helpers";
diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx
index 9b7b97ce6e4..668baad6d4c 100644
--- a/src/components/views/dialogs/InviteDialog.tsx
+++ b/src/components/views/dialogs/InviteDialog.tsx
@@ -16,8 +16,7 @@ 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, MatrixError } from "matrix-js-sdk/src/matrix";
+import { RoomMember, 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 { uniqBy } from "lodash";
diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx
index 7de4bed62c8..e4ac709d439 100644
--- a/src/components/views/dialogs/ShareDialog.tsx
+++ b/src/components/views/dialogs/ShareDialog.tsx
@@ -16,9 +16,8 @@ limitations under the License.
*/
import * as React from "react";
-import { Room } from "matrix-js-sdk/src/matrix";
+import { Room, RoomMember } 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";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/elements/AppPermission.tsx b/src/components/views/elements/AppPermission.tsx
index 2953e0dfddb..e667d0fb19f 100644
--- a/src/components/views/elements/AppPermission.tsx
+++ b/src/components/views/elements/AppPermission.tsx
@@ -17,7 +17,7 @@ limitations under the License.
*/
import React from "react";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { _t } from "../../../languageHandler";
import SdkConfig from "../../../SdkConfig";
diff --git a/src/components/views/elements/EventListSummary.tsx b/src/components/views/elements/EventListSummary.tsx
index 7e14ad28c32..24b4417f8a6 100644
--- a/src/components/views/elements/EventListSummary.tsx
+++ b/src/components/views/elements/EventListSummary.tsx
@@ -18,7 +18,7 @@ limitations under the License.
import React, { ComponentProps, ReactNode } from "react";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/elements/EventTilePreview.tsx b/src/components/views/elements/EventTilePreview.tsx
index 2648aac6a70..7476a3b52ff 100644
--- a/src/components/views/elements/EventTilePreview.tsx
+++ b/src/components/views/elements/EventTilePreview.tsx
@@ -17,7 +17,7 @@ limitations under the License.
import React from "react";
import classnames from "classnames";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { MsgType } from "matrix-js-sdk/src/@types/event";
import * as Avatar from "../../../Avatar";
diff --git a/src/components/views/elements/FacePile.tsx b/src/components/views/elements/FacePile.tsx
index f027c5d138d..6a03f7cbbe8 100644
--- a/src/components/views/elements/FacePile.tsx
+++ b/src/components/views/elements/FacePile.tsx
@@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { FC, HTMLAttributes, ReactNode } from "react";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import MemberAvatar from "../avatars/MemberAvatar";
import TooltipTarget from "./TooltipTarget";
diff --git a/src/components/views/elements/GenericEventListSummary.tsx b/src/components/views/elements/GenericEventListSummary.tsx
index 13a9466d5d4..4fd4ff8225c 100644
--- a/src/components/views/elements/GenericEventListSummary.tsx
+++ b/src/components/views/elements/GenericEventListSummary.tsx
@@ -17,7 +17,7 @@ limitations under the License.
import React, { ReactNode, useEffect } from "react";
import { uniqBy } from "lodash";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import MemberAvatar from "../avatars/MemberAvatar";
diff --git a/src/components/views/elements/RoomFacePile.tsx b/src/components/views/elements/RoomFacePile.tsx
index b8d9159fe1d..11f09159f16 100644
--- a/src/components/views/elements/RoomFacePile.tsx
+++ b/src/components/views/elements/RoomFacePile.tsx
@@ -15,8 +15,7 @@ limitations under the License.
*/
import React, { FC, HTMLAttributes, useContext } from "react";
-import { Room } from "matrix-js-sdk/src/matrix";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { sortBy } from "lodash";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/location/LocationButton.tsx b/src/components/views/location/LocationButton.tsx
index 08e13537d2f..127a9198c25 100644
--- a/src/components/views/location/LocationButton.tsx
+++ b/src/components/views/location/LocationButton.tsx
@@ -16,7 +16,7 @@ limitations under the License.
import React, { ReactNode, SyntheticEvent, useContext } from "react";
import classNames from "classnames";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { IEventRelation } from "matrix-js-sdk/src/models/event";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/location/LocationPicker.tsx b/src/components/views/location/LocationPicker.tsx
index ada89f169c4..2a05d0678f1 100644
--- a/src/components/views/location/LocationPicker.tsx
+++ b/src/components/views/location/LocationPicker.tsx
@@ -17,7 +17,7 @@ limitations under the License.
import React, { SyntheticEvent } from "react";
import maplibregl, { MapMouseEvent } from "maplibre-gl";
import { logger } from "matrix-js-sdk/src/logger";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { ClientEvent, IClientWellKnown } from "matrix-js-sdk/src/client";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/messages/CallEvent.tsx b/src/components/views/messages/CallEvent.tsx
index 02602cf334a..ee65bf26873 100644
--- a/src/components/views/messages/CallEvent.tsx
+++ b/src/components/views/messages/CallEvent.tsx
@@ -17,7 +17,7 @@ limitations under the License.
import React, { forwardRef, useCallback, useContext, useMemo } from "react";
import type { MatrixEvent } from "matrix-js-sdk/src/models/event";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import { ConnectionState, ElementCall } from "../../../models/Call";
import { _t } from "../../../languageHandler";
import {
diff --git a/src/components/views/messages/DisambiguatedProfile.tsx b/src/components/views/messages/DisambiguatedProfile.tsx
index ea959ee38c6..20788b71cbf 100644
--- a/src/components/views/messages/DisambiguatedProfile.tsx
+++ b/src/components/views/messages/DisambiguatedProfile.tsx
@@ -16,7 +16,7 @@ limitations under the License.
*/
import React from "react";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import classNames from "classnames";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/right_panel/EncryptionInfo.tsx b/src/components/views/right_panel/EncryptionInfo.tsx
index fb5503c788f..cc6fc525a59 100644
--- a/src/components/views/right_panel/EncryptionInfo.tsx
+++ b/src/components/views/right_panel/EncryptionInfo.tsx
@@ -15,7 +15,7 @@ limitations under the License.
*/
import React from "react";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { User } from "matrix-js-sdk/src/models/user";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/right_panel/EncryptionPanel.tsx b/src/components/views/right_panel/EncryptionPanel.tsx
index ede0e96c99b..95479144980 100644
--- a/src/components/views/right_panel/EncryptionPanel.tsx
+++ b/src/components/views/right_panel/EncryptionPanel.tsx
@@ -16,7 +16,7 @@ limitations under the License.
import React, { useCallback, useEffect, useState } from "react";
import { VerificationPhase, VerificationRequest, VerificationRequestEvent } from "matrix-js-sdk/src/crypto-api";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { User } from "matrix-js-sdk/src/models/user";
import EncryptionInfo from "./EncryptionInfo";
diff --git a/src/components/views/right_panel/PinnedMessagesCard.tsx b/src/components/views/right_panel/PinnedMessagesCard.tsx
index e85b0d5b8a9..02a04b2385f 100644
--- a/src/components/views/right_panel/PinnedMessagesCard.tsx
+++ b/src/components/views/right_panel/PinnedMessagesCard.tsx
@@ -15,11 +15,10 @@ limitations under the License.
*/
import React, { useCallback, useContext, useEffect, useState } from "react";
-import { Room, RoomEvent } from "matrix-js-sdk/src/matrix";
+import { Room, RoomEvent, RoomStateEvent } 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";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
import { Icon as ContextMenuIcon } from "../../../../res/img/element-icons/context-menu.svg";
import { Icon as EmojiIcon } from "../../../../res/img/element-icons/room/message-bar/emoji.svg";
diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx
index 3fbb53cb0d6..5f9307649a8 100644
--- a/src/components/views/right_panel/UserInfo.tsx
+++ b/src/components/views/right_panel/UserInfo.tsx
@@ -20,15 +20,13 @@ limitations under the License.
import React, { ReactNode, useCallback, useContext, useEffect, useMemo, useState } from "react";
import classNames from "classnames";
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { User } from "matrix-js-sdk/src/models/user";
-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";
import { logger } from "matrix-js-sdk/src/logger";
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
import { UserTrustLevel } from "matrix-js-sdk/src/crypto/CrossSigning";
import { Device } from "matrix-js-sdk/src/models/device";
diff --git a/src/components/views/right_panel/VerificationPanel.tsx b/src/components/views/right_panel/VerificationPanel.tsx
index f07569e6848..0a526aea8e4 100644
--- a/src/components/views/right_panel/VerificationPanel.tsx
+++ b/src/components/views/right_panel/VerificationPanel.tsx
@@ -22,11 +22,10 @@ import {
VerificationRequest,
VerificationRequestEvent,
} from "matrix-js-sdk/src/crypto-api";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember, Device } from "matrix-js-sdk/src/matrix";
import { User } from "matrix-js-sdk/src/models/user";
import { logger } from "matrix-js-sdk/src/logger";
import { ShowQrCodeCallbacks, ShowSasCallbacks, VerifierEvent } from "matrix-js-sdk/src/crypto-api/verification";
-import { Device } from "matrix-js-sdk/src/matrix";
import { MatrixClientPeg } from "../../../MatrixClientPeg";
import VerificationQRCode from "../elements/crypto/VerificationQRCode";
diff --git a/src/components/views/rooms/AuxPanel.tsx b/src/components/views/rooms/AuxPanel.tsx
index d4ae64a352c..00d82a70ab7 100644
--- a/src/components/views/rooms/AuxPanel.tsx
+++ b/src/components/views/rooms/AuxPanel.tsx
@@ -16,9 +16,8 @@ limitations under the License.
import React, { ReactNode } from "react";
import { lexicographicCompare } from "matrix-js-sdk/src/utils";
-import { Room } from "matrix-js-sdk/src/matrix";
+import { Room, RoomStateEvent } 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";
import { MatrixClientPeg } from "../../../MatrixClientPeg";
diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx
index 5ecf099f4e4..386c57f304e 100644
--- a/src/components/views/rooms/EventTile.tsx
+++ b/src/components/views/rooms/EventTile.tsx
@@ -20,10 +20,9 @@ import classNames from "classnames";
import { EventType, MsgType, RelationType } from "matrix-js-sdk/src/@types/event";
import { EventStatus, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event";
import { Relations } from "matrix-js-sdk/src/models/relations";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember, NotificationCountType, Room, RoomEvent } from "matrix-js-sdk/src/matrix";
import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread";
import { logger } from "matrix-js-sdk/src/logger";
-import { 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 ea7299df217..c833e60f31b 100644
--- a/src/components/views/rooms/LegacyRoomHeader.tsx
+++ b/src/components/views/rooms/LegacyRoomHeader.tsx
@@ -18,7 +18,7 @@ limitations under the License.
import React, { FC, useState, useMemo, useCallback } from "react";
import classNames from "classnames";
import { throttle } from "lodash";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { CallType } from "matrix-js-sdk/src/webrtc/call";
import { ISearchResults } from "matrix-js-sdk/src/@types/search";
diff --git a/src/components/views/rooms/MemberList.tsx b/src/components/views/rooms/MemberList.tsx
index 84b9b83fb22..fed1710eb38 100644
--- a/src/components/views/rooms/MemberList.tsx
+++ b/src/components/views/rooms/MemberList.tsx
@@ -19,9 +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/matrix";
-import { RoomMember, RoomMemberEvent } from "matrix-js-sdk/src/models/room-member";
-import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomEvent, RoomMember, RoomMemberEvent, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { User, UserEvent } from "matrix-js-sdk/src/models/user";
import { throttle } from "lodash";
import { JoinRule } from "matrix-js-sdk/src/@types/partials";
diff --git a/src/components/views/rooms/MemberTile.tsx b/src/components/views/rooms/MemberTile.tsx
index 805e57752bb..4ae5b2bbfce 100644
--- a/src/components/views/rooms/MemberTile.tsx
+++ b/src/components/views/rooms/MemberTile.tsx
@@ -16,12 +16,11 @@ limitations under the License.
*/
import React from "react";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember, RoomStateEvent } 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 { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo";
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
import { UserTrustLevel } from "matrix-js-sdk/src/crypto/CrossSigning";
import dis from "../../../dispatcher/dispatcher";
diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx
index 9e88016fe75..6667e2354e6 100644
--- a/src/components/views/rooms/MessageComposer.tsx
+++ b/src/components/views/rooms/MessageComposer.tsx
@@ -17,8 +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/matrix";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { Optional } from "matrix-events-sdk";
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
diff --git a/src/components/views/rooms/ReadReceiptMarker.tsx b/src/components/views/rooms/ReadReceiptMarker.tsx
index c23368e92a2..4d1df664f26 100644
--- a/src/components/views/rooms/ReadReceiptMarker.tsx
+++ b/src/components/views/rooms/ReadReceiptMarker.tsx
@@ -16,7 +16,7 @@ limitations under the License.
*/
import React, { createRef, RefObject } from "react";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import NodeAnimator from "../../../NodeAnimator";
diff --git a/src/components/views/rooms/RoomPreviewBar.tsx b/src/components/views/rooms/RoomPreviewBar.tsx
index 3cbd91699bc..74a5be68b5f 100644
--- a/src/components/views/rooms/RoomPreviewBar.tsx
+++ b/src/components/views/rooms/RoomPreviewBar.tsx
@@ -15,11 +15,10 @@ limitations under the License.
*/
import React, { ReactNode } from "react";
-import { Room } from "matrix-js-sdk/src/matrix";
+import { Room, RoomMember } 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";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
import classNames from "classnames";
import { RoomPreviewOpts, RoomViewLifecycle } from "@matrix-org/react-sdk-module-api/lib/lifecycles/RoomViewLifecycle";
diff --git a/src/components/views/rooms/RoomUpgradeWarningBar.tsx b/src/components/views/rooms/RoomUpgradeWarningBar.tsx
index 1c7b22090b8..55319f0121b 100644
--- a/src/components/views/rooms/RoomUpgradeWarningBar.tsx
+++ b/src/components/views/rooms/RoomUpgradeWarningBar.tsx
@@ -16,8 +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/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import Modal from "../../../Modal";
import { _t } from "../../../languageHandler";
diff --git a/src/components/views/rooms/ThirdPartyMemberInfo.tsx b/src/components/views/rooms/ThirdPartyMemberInfo.tsx
index d8995c69037..481360526a6 100644
--- a/src/components/views/rooms/ThirdPartyMemberInfo.tsx
+++ b/src/components/views/rooms/ThirdPartyMemberInfo.tsx
@@ -16,9 +16,8 @@ limitations under the License.
import React from "react";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
-import { Room } from "matrix-js-sdk/src/matrix";
+import { Room, RoomStateEvent } 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 { MatrixClientPeg } from "../../../MatrixClientPeg";
diff --git a/src/components/views/rooms/WhoIsTypingTile.tsx b/src/components/views/rooms/WhoIsTypingTile.tsx
index a65d24cc139..c67dc9c1c97 100644
--- a/src/components/views/rooms/WhoIsTypingTile.tsx
+++ b/src/components/views/rooms/WhoIsTypingTile.tsx
@@ -16,8 +16,7 @@ limitations under the License.
*/
import React from "react";
-import { Room, RoomEvent } from "matrix-js-sdk/src/matrix";
-import { RoomMember, RoomMemberEvent } from "matrix-js-sdk/src/models/room-member";
+import { Room, RoomEvent, RoomMember, RoomMemberEvent } from "matrix-js-sdk/src/matrix";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { compare } from "matrix-js-sdk/src/utils";
diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx
index d1d51f53940..454dd623b10 100644
--- a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx
+++ b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx
@@ -16,13 +16,11 @@ limitations under the License.
import React from "react";
import { EventType } from "matrix-js-sdk/src/@types/event";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
-import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { RoomMember, RoomState, RoomStateEvent, Room } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { throttle, get } from "lodash";
import { compare } from "matrix-js-sdk/src/utils";
import { IContent } from "matrix-js-sdk/src/models/event";
-import { Room } from "matrix-js-sdk/src/matrix";
import { _t, _td } from "../../../../../languageHandler";
import AccessibleButton from "../../../elements/AccessibleButton";
diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx
index 973a0dbeb7e..259aca0b559 100644
--- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx
+++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx
@@ -17,10 +17,9 @@ limitations under the License.
import React, { ReactNode } from "react";
import { GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/@types/partials";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { RoomStateEvent, Room } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { logger } from "matrix-js-sdk/src/logger";
-import { Room } from "matrix-js-sdk/src/matrix";
import { Icon as WarningIcon } from "../../../../../../res/img/warning.svg";
import { _t } from "../../../../../languageHandler";
diff --git a/src/components/views/settings/tabs/room/VoipRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/VoipRoomSettingsTab.tsx
index 71c0d21184f..15d75a53f46 100644
--- a/src/components/views/settings/tabs/room/VoipRoomSettingsTab.tsx
+++ b/src/components/views/settings/tabs/room/VoipRoomSettingsTab.tsx
@@ -17,8 +17,7 @@ limitations under the License.
import React, { useCallback, useMemo, useState } from "react";
import { JoinRule } from "matrix-js-sdk/src/@types/partials";
import { EventType } from "matrix-js-sdk/src/@types/event";
-import { RoomState } from "matrix-js-sdk/src/models/room-state";
-import { Room } from "matrix-js-sdk/src/matrix";
+import { RoomState, Room } from "matrix-js-sdk/src/matrix";
import { _t } from "../../../../../languageHandler";
import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch";
diff --git a/src/dispatcher/payloads/ViewUserPayload.ts b/src/dispatcher/payloads/ViewUserPayload.ts
index 20df21beb49..4007199cd58 100644
--- a/src/dispatcher/payloads/ViewUserPayload.ts
+++ b/src/dispatcher/payloads/ViewUserPayload.ts
@@ -14,7 +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 { RoomMember } from "matrix-js-sdk/src/matrix";
import { User } from "matrix-js-sdk/src/models/user";
import { ActionPayload } from "../payloads";
diff --git a/src/editor/parts.ts b/src/editor/parts.ts
index 1115958622e..2a119d2750b 100644
--- a/src/editor/parts.ts
+++ b/src/editor/parts.ts
@@ -17,8 +17,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/matrix";
+import { RoomMember, Room } from "matrix-js-sdk/src/matrix";
import GraphemeSplitter from "graphemer";
import AutocompleteWrapperModel, { GetAutocompleterComponent, UpdateCallback, UpdateQuery } from "./autocomplete";
diff --git a/src/hooks/room/useRoomMemberProfile.ts b/src/hooks/room/useRoomMemberProfile.ts
index 26cf0f67f2b..8a085d1989b 100644
--- a/src/hooks/room/useRoomMemberProfile.ts
+++ b/src/hooks/room/useRoomMemberProfile.ts
@@ -14,7 +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 { RoomMember } from "matrix-js-sdk/src/matrix";
import { useContext, useMemo } from "react";
import RoomContext, { TimelineRenderingType } from "../../contexts/RoomContext";
diff --git a/src/hooks/room/useTopic.ts b/src/hooks/room/useTopic.ts
index 8ee51473e0e..a80bb98c48d 100644
--- a/src/hooks/room/useTopic.ts
+++ b/src/hooks/room/useTopic.ts
@@ -17,8 +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/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { parseTopicContent, TopicState } from "matrix-js-sdk/src/content-helpers";
import { MRoomTopicEventContent } from "matrix-js-sdk/src/@types/topic";
import { Optional } from "matrix-events-sdk";
diff --git a/src/hooks/useCall.ts b/src/hooks/useCall.ts
index bfabeaf9ddd..60121d0aece 100644
--- a/src/hooks/useCall.ts
+++ b/src/hooks/useCall.ts
@@ -16,7 +16,7 @@ limitations under the License.
import { useState, useCallback, useMemo } from "react";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import { Call, ConnectionState, ElementCall, Layout, CallEvent } from "../models/Call";
import { useTypedEventEmitterState, useEventEmitter } from "./useEventEmitter";
import { CallStore, CallStoreEvent } from "../stores/CallStore";
diff --git a/src/hooks/useIsEncrypted.ts b/src/hooks/useIsEncrypted.ts
index 1dd50b99068..432ba196e38 100644
--- a/src/hooks/useIsEncrypted.ts
+++ b/src/hooks/useIsEncrypted.ts
@@ -17,8 +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/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { useTypedEventEmitter } from "./useEventEmitter";
diff --git a/src/hooks/useRoomMembers.ts b/src/hooks/useRoomMembers.ts
index 473bafcab89..482b5c282c2 100644
--- a/src/hooks/useRoomMembers.ts
+++ b/src/hooks/useRoomMembers.ts
@@ -15,9 +15,7 @@ limitations under the License.
*/
import { useState } from "react";
-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 { Room, RoomEvent, RoomMember, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { throttle } from "lodash";
import { useTypedEventEmitter } from "./useEventEmitter";
diff --git a/src/hooks/useRoomState.ts b/src/hooks/useRoomState.ts
index 7714b481197..1c8c27c285a 100644
--- a/src/hooks/useRoomState.ts
+++ b/src/hooks/useRoomState.ts
@@ -15,8 +15,7 @@ limitations under the License.
*/
import { useCallback, useEffect, useState } from "react";
-import { Room } from "matrix-js-sdk/src/matrix";
-import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { useTypedEventEmitter } from "./useEventEmitter";
diff --git a/src/indexing/EventIndex.ts b/src/indexing/EventIndex.ts
index 29bcaebe10e..3ef895fd37d 100644
--- a/src/indexing/EventIndex.ts
+++ b/src/indexing/EventIndex.ts
@@ -15,12 +15,10 @@ limitations under the License.
*/
import { EventEmitter } from "events";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember, Room, RoomEvent, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { Direction, EventTimeline } from "matrix-js-sdk/src/models/event-timeline";
-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";
import { TimelineIndex, TimelineWindow } from "matrix-js-sdk/src/timeline-window";
import { sleep } from "matrix-js-sdk/src/utils";
import { IEventWithRoomId, IMatrixProfile, IResultRoomEvents } from "matrix-js-sdk/src/@types/search";
diff --git a/src/mjolnir/Mjolnir.ts b/src/mjolnir/Mjolnir.ts
index 664c6ad84d4..8e4c8b9666b 100644
--- a/src/mjolnir/Mjolnir.ts
+++ b/src/mjolnir/Mjolnir.ts
@@ -17,7 +17,7 @@ limitations under the License.
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { Preset } from "matrix-js-sdk/src/@types/partials";
import { logger } from "matrix-js-sdk/src/logger";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { MatrixClientPeg } from "../MatrixClientPeg";
import { ALL_RULE_TYPES, BanList } from "./BanList";
diff --git a/src/models/Call.ts b/src/models/Call.ts
index 69b9ccf6cdd..e37efa3843d 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, RoomEvent } from "matrix-js-sdk/src/matrix";
+import { TypedEventEmitter, RoomEvent, RoomStateEvent } 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 { 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";
import { IWidgetApiRequest, MatrixWidgetType } from "matrix-widget-api";
@@ -33,8 +32,7 @@ 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/matrix";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { Room, 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/RoomSettingsHandler.ts b/src/settings/handlers/RoomSettingsHandler.ts
index 48370df36cb..e63613f64a8 100644
--- a/src/settings/handlers/RoomSettingsHandler.ts
+++ b/src/settings/handlers/RoomSettingsHandler.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 { RoomState, RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { defer } from "matrix-js-sdk/src/utils";
import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler";
diff --git a/src/stores/ActiveWidgetStore.ts b/src/stores/ActiveWidgetStore.ts
index edc46324860..ef678921025 100644
--- a/src/stores/ActiveWidgetStore.ts
+++ b/src/stores/ActiveWidgetStore.ts
@@ -15,8 +15,7 @@ limitations under the License.
*/
import EventEmitter from "events";
-import { MatrixEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix";
-import { RoomState } from "matrix-js-sdk/src/models/room-state";
+import { MatrixEvent, RoomStateEvent, RoomState } from "matrix-js-sdk/src/matrix";
import { MatrixClientPeg } from "../MatrixClientPeg";
import WidgetUtils from "../utils/WidgetUtils";
diff --git a/src/stores/OwnProfileStore.ts b/src/stores/OwnProfileStore.ts
index ce69a8f547f..c626b21f829 100644
--- a/src/stores/OwnProfileStore.ts
+++ b/src/stores/OwnProfileStore.ts
@@ -16,10 +16,9 @@ limitations under the License.
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { User, UserEvent } from "matrix-js-sdk/src/models/user";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { RoomStateEvent, MatrixError } from "matrix-js-sdk/src/matrix";
import { throttle } from "lodash";
import { EventType } from "matrix-js-sdk/src/@types/event";
-import { MatrixError } from "matrix-js-sdk/src/matrix";
import { ActionPayload } from "../dispatcher/payloads";
import { AsyncStoreWithClient } from "./AsyncStoreWithClient";
diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts
index 523644c7f88..2a73e8879b8 100644
--- a/src/stores/WidgetStore.ts
+++ b/src/stores/WidgetStore.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/matrix";
+import { Room, RoomStateEvent } 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";
import { ClientEvent } from "matrix-js-sdk/src/client";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
import { ActionPayload } from "../dispatcher/payloads";
import { AsyncStoreWithClient } from "./AsyncStoreWithClient";
diff --git a/src/stores/right-panel/RightPanelStoreIPanelState.ts b/src/stores/right-panel/RightPanelStoreIPanelState.ts
index 739f0ecf81c..654bc6f05e9 100644
--- a/src/stores/right-panel/RightPanelStoreIPanelState.ts
+++ b/src/stores/right-panel/RightPanelStoreIPanelState.ts
@@ -16,8 +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/matrix";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { VerificationRequest } from "matrix-js-sdk/src/crypto-api";
import { RightPanelPhases } from "./RightPanelStorePhases";
diff --git a/src/stores/spaces/SpaceStore.ts b/src/stores/spaces/SpaceStore.ts
index 94b929fba11..a2e0679bcbc 100644
--- a/src/stores/spaces/SpaceStore.ts
+++ b/src/stores/spaces/SpaceStore.ts
@@ -16,12 +16,10 @@ 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/matrix";
+import { Room, RoomEvent, RoomMember, RoomStateEvent } 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";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
import { ISendEventResponse } from "matrix-js-sdk/src/@types/requests";
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
diff --git a/src/stores/widgets/WidgetLayoutStore.ts b/src/stores/widgets/WidgetLayoutStore.ts
index b5e4fc33655..aeb6e45d301 100644
--- a/src/stores/widgets/WidgetLayoutStore.ts
+++ b/src/stores/widgets/WidgetLayoutStore.ts
@@ -14,9 +14,8 @@
* limitations under the License.
*/
-import { Room } from "matrix-js-sdk/src/matrix";
+import { Room, RoomStateEvent } 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";
import { compare, MapWithDefault, recursiveMapToObject } from "matrix-js-sdk/src/utils";
import { IWidget } from "matrix-widget-api";
diff --git a/src/utils/membership.ts b/src/utils/membership.ts
index 769d2d7924d..a61e241e1a8 100644
--- a/src/utils/membership.ts
+++ b/src/utils/membership.ts
@@ -14,10 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { Room } from "matrix-js-sdk/src/matrix";
+import { Room, RoomMember, RoomState, RoomStateEvent } 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";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
/**
diff --git a/src/utils/permalinks/Permalinks.ts b/src/utils/permalinks/Permalinks.ts
index 9569fc216dc..c5b1884f35c 100644
--- a/src/utils/permalinks/Permalinks.ts
+++ b/src/utils/permalinks/Permalinks.ts
@@ -16,9 +16,8 @@ limitations under the License.
import isIp from "is-ip";
import * as utils from "matrix-js-sdk/src/utils";
-import { Room, MatrixClient } from "matrix-js-sdk/src/matrix";
+import { Room, MatrixClient, RoomStateEvent } 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 MatrixToPermalinkConstructor, {
diff --git a/src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts b/src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts
index 62229ae6dc0..ae924e5f18a 100644
--- a/src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts
+++ b/src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts
@@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { Room } from "matrix-js-sdk/src/matrix";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { useTypedEventEmitterState } from "../../hooks/useEventEmitter";
import { MatrixClientPeg } from "../../MatrixClientPeg";
diff --git a/src/voice-broadcast/hooks/useVoiceBroadcastRecording.tsx b/src/voice-broadcast/hooks/useVoiceBroadcastRecording.tsx
index aba3525c451..4756eeeb841 100644
--- a/src/voice-broadcast/hooks/useVoiceBroadcastRecording.tsx
+++ b/src/voice-broadcast/hooks/useVoiceBroadcastRecording.tsx
@@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { Room } from "matrix-js-sdk/src/matrix";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import React from "react";
import {
diff --git a/test/components/structures/PipContainer-test.tsx b/test/components/structures/PipContainer-test.tsx
index e9102a5a4eb..3f56ec18e11 100644
--- a/test/components/structures/PipContainer-test.tsx
+++ b/test/components/structures/PipContainer-test.tsx
@@ -19,12 +19,11 @@ 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, MatrixEvent } from "matrix-js-sdk/src/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, MatrixEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { Widget, ClientWidgetApi } from "matrix-widget-api";
import { UserEvent } from "@testing-library/user-event/dist/types/setup/setup";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import {
useMockedCalls,
MockedCall,
diff --git a/test/components/views/avatars/MemberAvatar-test.tsx b/test/components/views/avatars/MemberAvatar-test.tsx
index aa3a6080231..4a9aa58dfc1 100644
--- a/test/components/views/avatars/MemberAvatar-test.tsx
+++ b/test/components/views/avatars/MemberAvatar-test.tsx
@@ -17,8 +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/matrix";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import React, { ComponentProps } from "react";
import MemberAvatar from "../../../../src/components/views/avatars/MemberAvatar";
diff --git a/test/components/views/location/LocationPicker-test.tsx b/test/components/views/location/LocationPicker-test.tsx
index ed6dba95f06..70c1d847701 100644
--- a/test/components/views/location/LocationPicker-test.tsx
+++ b/test/components/views/location/LocationPicker-test.tsx
@@ -17,7 +17,7 @@ limitations under the License.
import React from "react";
import { act, fireEvent, render, RenderResult } from "@testing-library/react";
import * as maplibregl from "maplibre-gl";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { mocked } from "jest-mock";
import { logger } from "matrix-js-sdk/src/logger";
diff --git a/test/components/views/location/LocationShareMenu-test.tsx b/test/components/views/location/LocationShareMenu-test.tsx
index 8ab7b46cbd0..53873b983a0 100644
--- a/test/components/views/location/LocationShareMenu-test.tsx
+++ b/test/components/views/location/LocationShareMenu-test.tsx
@@ -16,9 +16,8 @@ limitations under the License.
import React from "react";
import { mocked } from "jest-mock";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember, RelationType } from "matrix-js-sdk/src/matrix";
import { MatrixClient } from "matrix-js-sdk/src/client";
-import { RelationType } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { M_ASSET, LocationAssetType } from "matrix-js-sdk/src/@types/location";
import { act, fireEvent, render, RenderResult } from "@testing-library/react";
diff --git a/test/components/views/messages/CallEvent-test.tsx b/test/components/views/messages/CallEvent-test.tsx
index a02d4e7b928..1d6255f8a65 100644
--- a/test/components/views/messages/CallEvent-test.tsx
+++ b/test/components/views/messages/CallEvent-test.tsx
@@ -17,12 +17,11 @@ 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/matrix";
+import { Room, RoomStateEvent } 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";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import {
useMockedCalls,
MockedCall,
diff --git a/test/components/views/right_panel/PinnedMessagesCard-test.tsx b/test/components/views/right_panel/PinnedMessagesCard-test.tsx
index 30c33496dd7..74daa269f18 100644
--- a/test/components/views/right_panel/PinnedMessagesCard-test.tsx
+++ b/test/components/views/right_panel/PinnedMessagesCard-test.tsx
@@ -19,8 +19,7 @@ import { render, act, RenderResult, fireEvent, waitForElementToBeRemoved, screen
import { mocked } from "jest-mock";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { EventType, RelationType, MsgType } from "matrix-js-sdk/src/@types/event";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
-import { IEvent, Room, EventTimelineSet, IMinimalEvent } from "matrix-js-sdk/src/matrix";
+import { RoomStateEvent, IEvent, Room, EventTimelineSet, IMinimalEvent } from "matrix-js-sdk/src/matrix";
import { M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/src/@types/polls";
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
import { PollResponseEvent } from "matrix-js-sdk/src/extensible_events_v1/PollResponseEvent";
diff --git a/test/components/views/rooms/LegacyRoomHeader-test.tsx b/test/components/views/rooms/LegacyRoomHeader-test.tsx
index 399d4f8c134..63ca1d6b56d 100644
--- a/test/components/views/rooms/LegacyRoomHeader-test.tsx
+++ b/test/components/views/rooms/LegacyRoomHeader-test.tsx
@@ -18,8 +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/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { PendingEventOrdering } from "matrix-js-sdk/src/client";
import { CallType } from "matrix-js-sdk/src/webrtc/call";
import { ClientWidgetApi, Widget } from "matrix-widget-api";
@@ -28,7 +27,7 @@ import { ISearchResults } from "matrix-js-sdk/src/@types/search";
import type { MatrixClient } from "matrix-js-sdk/src/client";
import type { MatrixEvent } from "matrix-js-sdk/src/models/event";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import type { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
import {
stubClient,
diff --git a/test/components/views/rooms/MemberList-test.tsx b/test/components/views/rooms/MemberList-test.tsx
index 3706dfe1e33..a8fe64d602f 100644
--- a/test/components/views/rooms/MemberList-test.tsx
+++ b/test/components/views/rooms/MemberList-test.tsx
@@ -17,8 +17,7 @@ limitations under the License.
import React from "react";
import { act, render, RenderResult } from "@testing-library/react";
-import { Room, MatrixClient, RoomState } from "matrix-js-sdk/src/matrix";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { Room, MatrixClient, RoomState, RoomMember } from "matrix-js-sdk/src/matrix";
import { User } from "matrix-js-sdk/src/models/user";
import { compare } from "matrix-js-sdk/src/utils";
diff --git a/test/components/views/rooms/RoomPreviewCard-test.tsx b/test/components/views/rooms/RoomPreviewCard-test.tsx
index 73cb4ee4153..b4928551913 100644
--- a/test/components/views/rooms/RoomPreviewCard-test.tsx
+++ b/test/components/views/rooms/RoomPreviewCard-test.tsx
@@ -18,12 +18,11 @@ 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/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { RoomType } from "matrix-js-sdk/src/@types/event";
import type { MatrixClient } from "matrix-js-sdk/src/client";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import { stubClient, wrapInMatrixClientContext, mkRoomMember } from "../../../test-utils";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
import DMRoomMap from "../../../../src/utils/DMRoomMap";
diff --git a/test/components/views/rooms/RoomTile-test.tsx b/test/components/views/rooms/RoomTile-test.tsx
index fb0e78143a4..3fde2b9544c 100644
--- a/test/components/views/rooms/RoomTile-test.tsx
+++ b/test/components/views/rooms/RoomTile-test.tsx
@@ -18,12 +18,11 @@ 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, MatrixEvent } from "matrix-js-sdk/src/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, MatrixEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { Widget } from "matrix-widget-api";
import { Thread } from "matrix-js-sdk/src/models/thread";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import type { ClientWidgetApi } from "matrix-widget-api";
import {
stubClient,
diff --git a/test/components/views/voip/CallView-test.tsx b/test/components/views/voip/CallView-test.tsx
index e54eb737f97..d794e1bf19b 100644
--- a/test/components/views/voip/CallView-test.tsx
+++ b/test/components/views/voip/CallView-test.tsx
@@ -19,11 +19,10 @@ 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/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { Widget } from "matrix-widget-api";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import type { ClientWidgetApi } from "matrix-widget-api";
import {
stubClient,
diff --git a/test/models/Call-test.ts b/test/models/Call-test.ts
index 084ef650619..be80fd1b0e6 100644
--- a/test/models/Call-test.ts
+++ b/test/models/Call-test.ts
@@ -19,14 +19,13 @@ 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, MatrixEvent } from "matrix-js-sdk/src/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomEvent, MatrixEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { Widget } from "matrix-widget-api";
import { GroupCallIntent } from "matrix-js-sdk/src/webrtc/groupCall";
import type { Mocked } from "jest-mock";
import type { MatrixClient, IMyDevice } from "matrix-js-sdk/src/client";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import type { ClientWidgetApi } from "matrix-widget-api";
import {
JitsiCallMemberContent,
diff --git a/test/stores/SpaceStore-test.ts b/test/stores/SpaceStore-test.ts
index c38100cf548..62ca2c23522 100644
--- a/test/stores/SpaceStore-test.ts
+++ b/test/stores/SpaceStore-test.ts
@@ -17,10 +17,8 @@ limitations under the License.
import { EventEmitter } from "events";
import { mocked } from "jest-mock";
import { EventType } from "matrix-js-sdk/src/@types/event";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { RoomMember, RoomStateEvent, ClientEvent, MatrixEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix";
import { defer } from "matrix-js-sdk/src/utils";
-import { ClientEvent, MatrixEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix";
import SpaceStore from "../../src/stores/spaces/SpaceStore";
import {
diff --git a/test/stores/right-panel/RightPanelStore-test.ts b/test/stores/right-panel/RightPanelStore-test.ts
index 08ec1f01c64..284fd8deb12 100644
--- a/test/stores/right-panel/RightPanelStore-test.ts
+++ b/test/stores/right-panel/RightPanelStore-test.ts
@@ -16,7 +16,7 @@ limitations under the License.
import { mocked, MockedObject } from "jest-mock";
import { MatrixClient } from "matrix-js-sdk/src/client";
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import { RoomMember } from "matrix-js-sdk/src/matrix";
import { stubClient } from "../../test-utils";
import { MatrixClientPeg } from "../../../src/MatrixClientPeg";
diff --git a/test/stores/room-list/algorithms/Algorithm-test.ts b/test/stores/room-list/algorithms/Algorithm-test.ts
index a3d91b72350..a6c7accd693 100644
--- a/test/stores/room-list/algorithms/Algorithm-test.ts
+++ b/test/stores/room-list/algorithms/Algorithm-test.ts
@@ -16,8 +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/matrix";
-import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
+import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
import { Widget } from "matrix-widget-api";
import type { MatrixClient } from "matrix-js-sdk/src/client";
diff --git a/test/test-utils/call.ts b/test/test-utils/call.ts
index f9c1f40097b..c495afdb29b 100644
--- a/test/test-utils/call.ts
+++ b/test/test-utils/call.ts
@@ -17,8 +17,7 @@ limitations under the License.
import { MatrixWidgetType } from "matrix-widget-api";
import type { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
-import type { Room } from "matrix-js-sdk/src/matrix";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import type { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { mkEvent } from "./test-utils";
import { Call, ConnectionState, ElementCall, JitsiCall } from "../../src/models/Call";
diff --git a/test/toasts/IncomingCallToast-test.tsx b/test/toasts/IncomingCallToast-test.tsx
index 626b8270158..d3f47e4a5bd 100644
--- a/test/toasts/IncomingCallToast-test.tsx
+++ b/test/toasts/IncomingCallToast-test.tsx
@@ -17,13 +17,12 @@ 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/matrix";
+import { Room, RoomStateEvent } 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";
import { MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event";
-import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
+import type { RoomMember } from "matrix-js-sdk/src/matrix";
import {
useMockedCalls,
MockedCall,
From bdf875db327717c4de8c214667f7bace028cda38 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:36:41 +0100
Subject: [PATCH 08/11] Fix cypress-axe import
---
cypress/support/axe.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cypress/support/axe.ts b/cypress/support/axe.ts
index c30d55b8310..870b5a2d525 100644
--- a/cypress/support/axe.ts
+++ b/cypress/support/axe.ts
@@ -16,7 +16,7 @@ limitations under the License.
///
-import { Options } from "cypress-axe";
+import * as CypressAxe from "cypress-axe";
import * as axe from "axe-core";
import Chainable = Cypress.Chainable;
@@ -45,7 +45,7 @@ Cypress.Commands.overwrite(
(
originalFn: Chainable["checkA11y"],
context?: string | Node | axe.ContextObject | undefined,
- options: Options = {},
+ options: CypressAxe.Options = {},
violationCallback?: ((violations: axe.Result[]) => void) | undefined,
skipFailures?: boolean,
): void => {
From 691e201c6549877131676fd8c3d459760b2f5d6c Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:44:13 +0100
Subject: [PATCH 09/11] Fix more imports
---
src/Avatar.ts | 5 +----
src/BasePlatform.ts | 5 +----
src/Notifier.ts | 19 ++++++++++++-------
src/Resend.ts | 4 +---
src/RoomInvite.tsx | 6 +-----
src/RoomNotifs.ts | 15 +++++++++------
src/Rooms.ts | 5 +----
src/ScalarAuthClient.ts | 4 +---
src/Unread.ts | 6 +-----
src/VoipUserMapper.ts | 3 +--
src/WhoIsTyping.ts | 3 +--
src/actions/MatrixActionCreators.ts | 16 +++++++++++-----
src/actions/RoomListActions.ts | 3 +--
.../eventindex/ManageEventIndexDialog.tsx | 2 +-
src/audio/PlaybackQueue.ts | 4 +---
src/autocomplete/Autocompleter.ts | 2 +-
src/createRoom.ts | 13 ++++++++-----
17 files changed, 53 insertions(+), 62 deletions(-)
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/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";
From 173e43f37ce037911757f19da7a9b31d5c2416a9 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Aug 2023 10:53:24 +0100
Subject: [PATCH 10/11] Fix cypress-axe import
---
cypress/support/axe.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/cypress/support/axe.ts b/cypress/support/axe.ts
index 870b5a2d525..356c3187fb3 100644
--- a/cypress/support/axe.ts
+++ b/cypress/support/axe.ts
@@ -16,9 +16,10 @@ limitations under the License.
///
-import * as CypressAxe from "cypress-axe";
+import "cypress-axe";
import * as axe from "axe-core";
+import type { Options } from "cypress-axe";
import Chainable = Cypress.Chainable;
function terminalLog(violations: axe.Result[]): void {
@@ -45,7 +46,7 @@ Cypress.Commands.overwrite(
(
originalFn: Chainable["checkA11y"],
context?: string | Node | axe.ContextObject | undefined,
- options: CypressAxe.Options = {},
+ options: Options = {},
violationCallback?: ((violations: axe.Result[]) => void) | undefined,
skipFailures?: boolean,
): void => {
From 8d7645fb8597903fb92e415786d3e3718756a58a Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Fri, 4 Aug 2023 11:55:07 +0100
Subject: [PATCH 11/11] Fix bad merge
---
src/components/views/dialogs/InviteDialog.tsx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx
index 668baad6d4c..ceedfd5c81f 100644
--- a/src/components/views/dialogs/InviteDialog.tsx
+++ b/src/components/views/dialogs/InviteDialog.tsx
@@ -868,11 +868,17 @@ export default class InviteDialog extends React.PureComponent m.userId === address);
if (member) {