From c3574c2050287cffe1affd0b1d8aacf2a516fc21 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 9 Aug 2023 08:18:41 +0100 Subject: [PATCH] Switch to importing client from main js-sdk export (#11370) --- .eslintrc.js | 4 ++++ src/ContentMessages.ts | 2 +- src/Lifecycle.ts | 3 +-- src/Login.ts | 4 +--- src/MatrixClientPeg.ts | 3 ++- src/PosthogAnalytics.ts | 2 +- src/SecurityManager.ts | 3 +-- .../views/dialogs/security/ExportE2eKeysDialog.tsx | 2 +- .../views/dialogs/security/ImportE2eKeysDialog.tsx | 2 +- src/boundThreepids.ts | 2 +- src/components/structures/InteractiveAuth.tsx | 2 +- src/components/structures/LoggedInView.tsx | 10 ++++++++-- src/components/structures/RoomView.tsx | 2 +- src/components/structures/TimelinePanel.tsx | 3 ++- src/components/structures/auth/Registration.tsx | 13 +++++++++++-- .../views/auth/InteractiveAuthEntryComponents.tsx | 2 +- src/components/views/auth/LoginWithQR.tsx | 2 +- src/components/views/auth/RegistrationForm.tsx | 3 +-- src/components/views/avatars/BaseAvatar.tsx | 3 +-- src/components/views/beacon/BeaconViewDialog.tsx | 3 +-- src/components/views/dialogs/BaseDialog.tsx | 2 +- src/components/views/dialogs/BulkRedactDialog.tsx | 3 +-- src/components/views/dialogs/EndPollDialog.tsx | 3 +-- src/components/views/dialogs/ForwardDialog.tsx | 3 +-- .../views/dialogs/InteractiveAuthDialog.tsx | 2 +- .../views/dialogs/MessageEditHistoryDialog.tsx | 3 +-- src/components/views/dialogs/PollHistoryDialog.tsx | 3 +-- .../views/dialogs/ScrollableBaseModal.tsx | 2 +- .../views/dialogs/SpaceSettingsDialog.tsx | 3 +-- .../dialogs/security/CreateCrossSigningDialog.tsx | 3 +-- .../dialogs/security/RestoreKeyBackupDialog.tsx | 3 +-- src/components/views/elements/ReplyChain.tsx | 3 +-- src/components/views/elements/SSOButtons.tsx | 2 +- src/components/views/location/LocationPicker.tsx | 3 +-- .../views/location/LocationViewDialog.tsx | 3 +-- src/components/views/location/shareLocation.ts | 3 +-- src/components/views/messages/MImageBody.tsx | 2 +- src/components/views/messages/RedactedBody.tsx | 2 +- .../views/polls/pollHistory/PollHistory.tsx | 3 +-- .../views/polls/pollHistory/fetchPastPolls.ts | 3 +-- .../views/polls/pollHistory/usePollHistory.ts | 3 +-- src/components/views/right_panel/UserInfo.tsx | 13 +++++++++++-- src/components/views/rooms/LinkPreviewGroup.tsx | 3 +-- src/components/views/rooms/LinkPreviewWidget.tsx | 3 +-- src/components/views/rooms/MemberList.tsx | 2 +- .../views/rooms/MessageComposerButtons.tsx | 3 +-- src/components/views/rooms/NewRoomIntro.tsx | 3 +-- src/components/views/rooms/RoomInfoLine.tsx | 3 +-- src/components/views/rooms/RoomListHeader.tsx | 3 +-- src/components/views/rooms/Stickerpicker.tsx | 3 +-- src/components/views/settings/ChangePassword.tsx | 2 +- .../views/settings/tabs/user/SessionManagerTab.tsx | 2 +- .../views/spaces/SpaceSettingsGeneralTab.tsx | 3 +-- .../views/spaces/SpaceSettingsVisibilityTab.tsx | 3 +-- src/contexts/MatrixClientContext.tsx | 2 +- src/customisations/Media.ts | 3 +-- src/editor/parts.ts | 3 +-- src/events/EventTileFactory.tsx | 3 +-- src/hooks/useAccountData.ts | 3 +-- src/hooks/useIsEncrypted.ts | 3 +-- src/hooks/usePublicRoomDirectory.ts | 3 +-- src/indexing/EventIndex.ts | 3 ++- src/integrations/IntegrationManagers.ts | 2 +- src/models/Call.ts | 6 ++---- src/sentry.ts | 2 +- src/settings/Settings.tsx | 2 +- .../controllers/MatrixClientBackedController.ts | 2 +- src/settings/handlers/AccountSettingsHandler.ts | 3 +-- .../handlers/MatrixClientBackedSettingsHandler.ts | 2 +- src/settings/handlers/RoomAccountSettingsHandler.ts | 3 +-- src/settings/handlers/RoomSettingsHandler.ts | 3 +-- src/stores/AsyncStoreWithClient.ts | 2 +- src/stores/BreadcrumbsStore.ts | 3 +-- src/stores/ReadyWatchingStore.ts | 2 +- src/stores/WidgetStore.ts | 3 +-- src/stores/local-echo/GenericEchoChamber.ts | 2 +- src/stores/notifications/RoomNotificationState.ts | 3 +-- .../notifications/RoomNotificationStateStore.ts | 3 +-- src/stores/oidc/OidcClientStore.ts | 2 +- src/stores/room-list/RoomListStore.ts | 3 +-- src/stores/spaces/SpaceStore.ts | 2 +- src/stores/widgets/StopGapWidget.ts | 3 +-- src/stores/widgets/StopGapWidgetDriver.ts | 11 +++++++++-- src/utils/AutoDiscoveryUtils.tsx | 3 +-- src/utils/DMRoomMap.ts | 3 +-- src/utils/DirectoryUtils.ts | 2 +- src/utils/EventUtils.ts | 2 +- src/utils/MultiInviter.ts | 3 +-- src/utils/RoomUpgrade.ts | 3 +-- src/utils/ShieldUtils.ts | 3 +-- src/utils/ValidatedServerConfig.ts | 2 +- src/utils/WellKnownUtils.ts | 2 +- src/utils/crypto/shouldSkipSetupEncryption.ts | 2 +- src/utils/device/clientInformation.ts | 2 +- src/utils/direct-messages.ts | 2 +- src/utils/membership.ts | 3 +-- src/utils/notifications.ts | 8 ++++++-- src/utils/pushRules/monitorSyncedPushRules.ts | 3 +-- src/utils/pushRules/updatePushRuleActions.ts | 3 +-- src/utils/read-receipts.ts | 3 +-- src/widgets/Jitsi.ts | 2 +- test/Notifier-test.ts | 12 ++++++++++-- test/components/structures/LoggedInView-test.tsx | 3 +-- test/components/structures/MatrixChat-test.tsx | 3 +-- test/components/structures/PipContainer-test.tsx | 3 +-- test/components/structures/RightPanel-test.tsx | 2 +- test/components/structures/RoomStatusBar-test.tsx | 3 +-- test/components/structures/RoomView-test.tsx | 3 ++- test/components/structures/SpaceHierarchy-test.tsx | 3 +-- test/components/structures/ThreadView-test.tsx | 11 +++++++++-- test/components/views/avatars/MemberAvatar-test.tsx | 3 +-- .../views/context_menus/RoomContextMenu-test.tsx | 3 +-- .../context_menus/RoomGeneralContextMenu-test.tsx | 3 +-- .../context_menus/ThreadListContextMenu-test.tsx | 3 +-- .../views/context_menus/WidgetContextMenu-test.tsx | 2 +- .../views/dialogs/DevtoolsDialog-test.tsx | 3 +-- .../ManualDeviceKeyVerificationDialog-test.tsx | 3 +-- .../views/dialogs/devtools/Event-test.tsx | 3 +-- .../dialogs/devtools/RoomNotifications-test.tsx | 3 +-- .../spotlight/PublicRoomResultDetails-test.tsx | 2 +- .../spotlight/RoomResultContextMenus-test.tsx | 3 +-- .../views/location/LocationPicker-test.tsx | 3 +-- .../views/location/LocationShareMenu-test.tsx | 3 +-- test/components/views/messages/CallEvent-test.tsx | 3 +-- .../views/messages/DateSeparator-test.tsx | 2 +- .../right_panel/LegacyRoomHeaderButtons-test.tsx | 11 +++++++++-- test/components/views/rooms/EventTile-test.tsx | 12 ++++++++++-- .../views/rooms/LegacyRoomHeader-test.tsx | 6 ++---- .../UnreadNotificationBadge-test.tsx | 13 ++++++++++--- test/components/views/rooms/RoomListHeader-test.tsx | 3 +-- .../components/views/rooms/RoomPreviewCard-test.tsx | 6 ++---- test/components/views/rooms/RoomTile-test.tsx | 3 +-- .../settings/discovery/EmailAddresses-test.tsx | 2 +- .../tabs/room/AdvancedRoomSettingsTab-test.tsx | 3 +-- .../tabs/room/NotificationSettingsTab-test.tsx | 2 +- .../tabs/room/RolesRoomSettingsTab-test.tsx | 3 +-- .../settings/tabs/room/VoipRoomSettingsTab-test.tsx | 3 +-- test/components/views/voip/CallView-test.tsx | 3 +-- test/components/views/voip/VideoFeed-test.tsx | 3 +-- test/models/Call-test.ts | 6 ++---- .../settings/handlers/DeviceSettingsHandler-test.ts | 2 +- test/stores/oidc/OidcClientStore-test.ts | 2 +- test/stores/right-panel/RightPanelStore-test.ts | 3 +-- test/stores/room-list/algorithms/Algorithm-test.ts | 5 ++--- .../list-ordering/NaturalAlgorithm-test.ts | 3 +-- test/stores/widgets/StopGapWidget-test.ts | 3 +-- test/stores/widgets/StopGapWidgetDriver-test.ts | 12 ++++++++++-- test/test-utils/poll.ts | 3 +-- test/toasts/IncomingCallToast-test.tsx | 3 +-- test/utils/AutoDiscoveryUtils-test.tsx | 2 +- test/utils/leave-behaviour-test.ts | 3 +-- test/utils/notifications-test.ts | 3 +-- .../utils/isRelatedToVoiceBroadcast-test.ts | 3 +-- .../utils/retrieveStartedInfoEvent-test.ts | 3 +-- ...ForVoiceBroadcastStoppedEventWithoutLink-test.ts | 2 +- 155 files changed, 259 insertions(+), 268 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d1c04b6ef8..0cd94ce4f2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -110,6 +110,10 @@ module.exports = { name: "matrix-js-sdk/src/@types/event", message: "Please use matrix-js-sdk/src/matrix instead", }, + { + name: "matrix-js-sdk/src/client", + 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/ContentMessages.ts b/src/ContentMessages.ts index 52ccc1e8e9..82df5706ac 100644 --- a/src/ContentMessages.ts +++ b/src/ContentMessages.ts @@ -16,8 +16,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; import { + MatrixClient, MsgType, IImageInfo, HTTPError, diff --git a/src/Lifecycle.ts b/src/Lifecycle.ts index 315b3a3fc7..6d6a3ec1c2 100644 --- a/src/Lifecycle.ts +++ b/src/Lifecycle.ts @@ -18,9 +18,8 @@ limitations under the License. */ import { ReactNode } from "react"; -import { createClient } from "matrix-js-sdk/src/matrix"; +import { createClient, MatrixClient } from "matrix-js-sdk/src/matrix"; import { InvalidStoreError } from "matrix-js-sdk/src/errors"; -import { MatrixClient } from "matrix-js-sdk/src/client"; import { decryptAES, encryptAES, IEncryptedPayload } from "matrix-js-sdk/src/crypto/aes"; import { QueryDict } from "matrix-js-sdk/src/utils"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/Login.ts b/src/Login.ts index 644648b7cc..d918aebc4b 100644 --- a/src/Login.ts +++ b/src/Login.ts @@ -15,9 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// @ts-ignore - XXX: tsc doesn't like this: our js-sdk imports are complex so this isn't surprising -import { createClient } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { createClient, MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { DELEGATED_OIDC_COMPATIBILITY, ILoginFlow, LoginFlow, LoginRequest } from "matrix-js-sdk/src/@types/auth"; diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index 71cd7cbb45..22c2dcb45c 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -24,8 +24,9 @@ import { RoomNameType, EventTimeline, EventTimelineSet, + IStartClientOpts, + MatrixClient, } from "matrix-js-sdk/src/matrix"; -import { IStartClientOpts, MatrixClient } from "matrix-js-sdk/src/client"; import { MemoryStore } from "matrix-js-sdk/src/store/memory"; import * as utils from "matrix-js-sdk/src/utils"; import { verificationMethods } from "matrix-js-sdk/src/crypto"; diff --git a/src/PosthogAnalytics.ts b/src/PosthogAnalytics.ts index 5924c0a768..77ef07b178 100644 --- a/src/PosthogAnalytics.ts +++ b/src/PosthogAnalytics.ts @@ -15,7 +15,7 @@ limitations under the License. */ import posthog, { CaptureOptions, PostHog, Properties } from "posthog-js"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { UserProperties } from "@matrix-org/analytics-events/types/typescript/UserProperties"; import { Signup } from "@matrix-org/analytics-events/types/typescript/Signup"; diff --git a/src/SecurityManager.ts b/src/SecurityManager.ts index 0e71076991..16cd300b7a 100644 --- a/src/SecurityManager.ts +++ b/src/SecurityManager.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { DeviceVerificationStatus, ICryptoCallbacks } from "matrix-js-sdk/src/matrix"; +import { DeviceVerificationStatus, ICryptoCallbacks, MatrixClient } from "matrix-js-sdk/src/matrix"; import { ISecretStorageKeyInfo } from "matrix-js-sdk/src/crypto/api"; -import { MatrixClient } from "matrix-js-sdk/src/client"; import { deriveKey } from "matrix-js-sdk/src/crypto/key_passphrase"; import { decodeRecoveryKey } from "matrix-js-sdk/src/crypto/recoverykey"; import { encodeBase64 } from "matrix-js-sdk/src/crypto/olmlib"; diff --git a/src/async-components/views/dialogs/security/ExportE2eKeysDialog.tsx b/src/async-components/views/dialogs/security/ExportE2eKeysDialog.tsx index 1f138146b9..4574dd7b4f 100644 --- a/src/async-components/views/dialogs/security/ExportE2eKeysDialog.tsx +++ b/src/async-components/views/dialogs/security/ExportE2eKeysDialog.tsx @@ -17,7 +17,7 @@ limitations under the License. import FileSaver from "file-saver"; import React, { ChangeEvent } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { _t, _td } from "../../../../languageHandler"; diff --git a/src/async-components/views/dialogs/security/ImportE2eKeysDialog.tsx b/src/async-components/views/dialogs/security/ImportE2eKeysDialog.tsx index 9157c8ce5f..e9bf268cba 100644 --- a/src/async-components/views/dialogs/security/ImportE2eKeysDialog.tsx +++ b/src/async-components/views/dialogs/security/ImportE2eKeysDialog.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React, { createRef } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import * as MegolmExportEncryption from "../../../../utils/MegolmExportEncryption"; diff --git a/src/boundThreepids.ts b/src/boundThreepids.ts index 9fed6c46bd..5fbc3ca550 100644 --- a/src/boundThreepids.ts +++ b/src/boundThreepids.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { MatrixError } from "matrix-js-sdk/src/http-api"; import IdentityAuthClient from "./IdentityAuthClient"; diff --git a/src/components/structures/InteractiveAuth.tsx b/src/components/structures/InteractiveAuth.tsx index 5c9d53ce92..67c765760d 100644 --- a/src/components/structures/InteractiveAuth.tsx +++ b/src/components/structures/InteractiveAuth.tsx @@ -23,7 +23,7 @@ import { InteractiveAuth, IStageStatus, } from "matrix-js-sdk/src/interactive-auth"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import getEntryComponentForLoginType, { IStageComponent } from "../views/auth/InteractiveAuthEntryComponents"; diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx index 873559a7c6..612c563cfd 100644 --- a/src/components/structures/LoggedInView.tsx +++ b/src/components/structures/LoggedInView.tsx @@ -15,8 +15,14 @@ limitations under the License. */ import React, { ClipboardEvent } from "react"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent, RoomStateEvent, MatrixError, IUsageLimit } from "matrix-js-sdk/src/matrix"; +import { + ClientEvent, + MatrixClient, + MatrixEvent, + RoomStateEvent, + MatrixError, + IUsageLimit, +} from "matrix-js-sdk/src/matrix"; import { MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import classNames from "classnames"; import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync"; diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 81d385d174..0a2e06fc43 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -33,12 +33,12 @@ import { EventType, HistoryVisibility, JoinRule, + ClientEvent, } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { CallState, MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import { throttle } from "lodash"; import { MatrixError } from "matrix-js-sdk/src/http-api"; -import { ClientEvent } from "matrix-js-sdk/src/client"; import { CryptoEvent } from "matrix-js-sdk/src/crypto"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; import { ISearchResults } from "matrix-js-sdk/src/@types/search"; diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index cb4ce3a3e0..e63c1beecb 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -29,12 +29,13 @@ import { EventTimeline, EventType, RelationType, + ClientEvent, + MatrixClient, } from "matrix-js-sdk/src/matrix"; import { TimelineWindow } from "matrix-js-sdk/src/timeline-window"; import { SyncState } from "matrix-js-sdk/src/sync"; import { debounce, findLastIndex, throttle } from "lodash"; import { logger } from "matrix-js-sdk/src/logger"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; import { Thread, ThreadEvent } from "matrix-js-sdk/src/models/thread"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; import { MatrixError } from "matrix-js-sdk/src/http-api"; diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index eeca4a9719..2a8f89a5cd 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -14,9 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { AuthType, createClient, IAuthData, IAuthDict, IInputs, MatrixError } from "matrix-js-sdk/src/matrix"; +import { + AuthType, + createClient, + IAuthData, + IAuthDict, + IInputs, + MatrixError, + IRegisterRequestParams, + IRequestTokenResponse, + MatrixClient, +} from "matrix-js-sdk/src/matrix"; import React, { Fragment, ReactNode } from "react"; -import { IRegisterRequestParams, IRequestTokenResponse, MatrixClient } from "matrix-js-sdk/src/client"; import classNames from "classnames"; import { logger } from "matrix-js-sdk/src/logger"; import { ISSOFlow, SSOAction } from "matrix-js-sdk/src/@types/auth"; diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.tsx b/src/components/views/auth/InteractiveAuthEntryComponents.tsx index cf974436e3..add3638fcb 100644 --- a/src/components/views/auth/InteractiveAuthEntryComponents.tsx +++ b/src/components/views/auth/InteractiveAuthEntryComponents.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import classNames from "classnames"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { AuthType, IAuthDict, IInputs, IStageStatus } from "matrix-js-sdk/src/interactive-auth"; import { logger } from "matrix-js-sdk/src/logger"; import React, { ChangeEvent, createRef, FormEvent, Fragment } from "react"; diff --git a/src/components/views/auth/LoginWithQR.tsx b/src/components/views/auth/LoginWithQR.tsx index 2285d2b589..7c7175b967 100644 --- a/src/components/views/auth/LoginWithQR.tsx +++ b/src/components/views/auth/LoginWithQR.tsx @@ -19,7 +19,7 @@ import { MSC3906Rendezvous, MSC3906RendezvousPayload, RendezvousFailureReason } import { MSC3886SimpleHttpRendezvousTransport } from "matrix-js-sdk/src/rendezvous/transports"; import { MSC3903ECDHPayload, MSC3903ECDHv2RendezvousChannel } from "matrix-js-sdk/src/rendezvous/channels"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import { wrapRequestWithDialog } from "../../../utils/UserInteractiveAuth"; diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index 5f2a5c4fac..dc0f38373f 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -16,9 +16,8 @@ limitations under the License. */ import React, { BaseSyntheticEvent, ReactNode } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixError } from "matrix-js-sdk/src/matrix"; import * as Email from "../../../email"; import { looksValid as phoneNumberLooksValid, PhoneNumberCountryDefinition } from "../../../phonenumber"; diff --git a/src/components/views/avatars/BaseAvatar.tsx b/src/components/views/avatars/BaseAvatar.tsx index f0cd65f810..e96bf1333a 100644 --- a/src/components/views/avatars/BaseAvatar.tsx +++ b/src/components/views/avatars/BaseAvatar.tsx @@ -19,8 +19,7 @@ limitations under the License. import React, { useCallback, useContext, useEffect, useState } from "react"; import classNames from "classnames"; -import { ResizeMethod } from "matrix-js-sdk/src/matrix"; -import { ClientEvent } from "matrix-js-sdk/src/client"; +import { ResizeMethod, ClientEvent } from "matrix-js-sdk/src/matrix"; import * as AvatarLogic from "../../../Avatar"; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/beacon/BeaconViewDialog.tsx b/src/components/views/beacon/BeaconViewDialog.tsx index f2277b81f3..013ce74d6a 100644 --- a/src/components/views/beacon/BeaconViewDialog.tsx +++ b/src/components/views/beacon/BeaconViewDialog.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { useState, useEffect } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Beacon, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, Beacon, Room } from "matrix-js-sdk/src/matrix"; import * as maplibregl from "maplibre-gl"; import { Icon as LiveLocationIcon } from "../../../../res/img/location/live-location.svg"; diff --git a/src/components/views/dialogs/BaseDialog.tsx b/src/components/views/dialogs/BaseDialog.tsx index 94fbd46d94..ca9f44e0e9 100644 --- a/src/components/views/dialogs/BaseDialog.tsx +++ b/src/components/views/dialogs/BaseDialog.tsx @@ -19,7 +19,7 @@ limitations under the License. import React from "react"; import FocusLock from "react-focus-lock"; import classNames from "classnames"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import AccessibleButton from "../elements/AccessibleButton"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; diff --git a/src/components/views/dialogs/BulkRedactDialog.tsx b/src/components/views/dialogs/BulkRedactDialog.tsx index bca1114306..7e475900f6 100644 --- a/src/components/views/dialogs/BulkRedactDialog.tsx +++ b/src/components/views/dialogs/BulkRedactDialog.tsx @@ -16,8 +16,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, Room, MatrixEvent, EventTimeline, EventType } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, RoomMember, Room, MatrixEvent, EventTimeline, EventType } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import dis from "../../../dispatcher/dispatcher"; diff --git a/src/components/views/dialogs/EndPollDialog.tsx b/src/components/views/dialogs/EndPollDialog.tsx index 4f77c13417..2c81995b07 100644 --- a/src/components/views/dialogs/EndPollDialog.tsx +++ b/src/components/views/dialogs/EndPollDialog.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { PollEndEvent } from "matrix-js-sdk/src/extensible_events_v1/PollEndEvent"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/dialogs/ForwardDialog.tsx b/src/components/views/dialogs/ForwardDialog.tsx index a2e484216b..72fe8f2c7c 100644 --- a/src/components/views/dialogs/ForwardDialog.tsx +++ b/src/components/views/dialogs/ForwardDialog.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { useEffect, useMemo, useState } from "react"; import classnames from "classnames"; -import { IContent, MatrixEvent, Room, RoomMember, EventType } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { IContent, MatrixEvent, Room, RoomMember, EventType, MatrixClient } from "matrix-js-sdk/src/matrix"; import { ILocationContent, LocationAssetType, M_TIMESTAMP } from "matrix-js-sdk/src/@types/location"; import { makeLocationContent } from "matrix-js-sdk/src/content-helpers"; import { M_BEACON } from "matrix-js-sdk/src/@types/beacon"; diff --git a/src/components/views/dialogs/InteractiveAuthDialog.tsx b/src/components/views/dialogs/InteractiveAuthDialog.tsx index 2ba3db0fb6..4fbb3456f6 100644 --- a/src/components/views/dialogs/InteractiveAuthDialog.tsx +++ b/src/components/views/dialogs/InteractiveAuthDialog.tsx @@ -17,7 +17,7 @@ limitations under the License. */ import React from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { AuthType } from "matrix-js-sdk/src/interactive-auth"; import { UIAResponse } from "matrix-js-sdk/src/@types/uia"; diff --git a/src/components/views/dialogs/MessageEditHistoryDialog.tsx b/src/components/views/dialogs/MessageEditHistoryDialog.tsx index 9fed37e49c..02edadcc32 100644 --- a/src/components/views/dialogs/MessageEditHistoryDialog.tsx +++ b/src/components/views/dialogs/MessageEditHistoryDialog.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent, EventType, RelationType } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, EventType, RelationType, MatrixClient } from "matrix-js-sdk/src/matrix"; import { defer } from "matrix-js-sdk/src/utils"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixClient } from "matrix-js-sdk/src/client"; import { MatrixError } from "matrix-js-sdk/src/http-api"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; diff --git a/src/components/views/dialogs/PollHistoryDialog.tsx b/src/components/views/dialogs/PollHistoryDialog.tsx index 5ee88bbd39..7637d4e51b 100644 --- a/src/components/views/dialogs/PollHistoryDialog.tsx +++ b/src/components/views/dialogs/PollHistoryDialog.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, Room } from "matrix-js-sdk/src/matrix"; import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; import { PollHistory } from "../polls/pollHistory/PollHistory"; diff --git a/src/components/views/dialogs/ScrollableBaseModal.tsx b/src/components/views/dialogs/ScrollableBaseModal.tsx index 507c97c53f..be06807408 100644 --- a/src/components/views/dialogs/ScrollableBaseModal.tsx +++ b/src/components/views/dialogs/ScrollableBaseModal.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { FormEvent } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import FocusLock from "react-focus-lock"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; diff --git a/src/components/views/dialogs/SpaceSettingsDialog.tsx b/src/components/views/dialogs/SpaceSettingsDialog.tsx index 541954f9ee..5e8d6bd9af 100644 --- a/src/components/views/dialogs/SpaceSettingsDialog.tsx +++ b/src/components/views/dialogs/SpaceSettingsDialog.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { useMemo } from "react"; -import { Room } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { _t, _td } from "../../../languageHandler"; import BaseDialog from "./BaseDialog"; diff --git a/src/components/views/dialogs/security/CreateCrossSigningDialog.tsx b/src/components/views/dialogs/security/CreateCrossSigningDialog.tsx index ce089b873e..ba54bc28f5 100644 --- a/src/components/views/dialogs/security/CreateCrossSigningDialog.tsx +++ b/src/components/views/dialogs/security/CreateCrossSigningDialog.tsx @@ -16,9 +16,8 @@ limitations under the License. */ import React from "react"; -import { CrossSigningKeys } from "matrix-js-sdk/src/client"; +import { CrossSigningKeys, AuthDict, MatrixError, UIAFlow } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { AuthDict, MatrixError, UIAFlow } from "matrix-js-sdk/src/matrix"; import { UIAResponse } from "matrix-js-sdk/src/@types/uia"; import { MatrixClientPeg } from "../../../../MatrixClientPeg"; diff --git a/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx b/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx index cbcb9d1706..fdf558e8ea 100644 --- a/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx +++ b/src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx @@ -16,11 +16,10 @@ limitations under the License. */ import React, { ChangeEvent } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix"; import { IKeyBackupInfo, IKeyBackupRestoreResult } from "matrix-js-sdk/src/crypto/keybackup"; import { ISecretStorageKeyInfo } from "matrix-js-sdk/src/crypto/api"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixError } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../../../../MatrixClientPeg"; import { _t } from "../../../../languageHandler"; diff --git a/src/components/views/elements/ReplyChain.tsx b/src/components/views/elements/ReplyChain.tsx index 10fdfdba2f..2ef8d3bd17 100644 --- a/src/components/views/elements/ReplyChain.tsx +++ b/src/components/views/elements/ReplyChain.tsx @@ -17,8 +17,7 @@ limitations under the License. import React from "react"; import classNames from "classnames"; -import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixEvent, Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import dis from "../../../dispatcher/dispatcher"; diff --git a/src/components/views/elements/SSOButtons.tsx b/src/components/views/elements/SSOButtons.tsx index 5c90b39442..9b8c4bd80f 100644 --- a/src/components/views/elements/SSOButtons.tsx +++ b/src/components/views/elements/SSOButtons.tsx @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import { chunk } from "lodash"; import classNames from "classnames"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { Signup } from "@matrix-org/analytics-events/types/typescript/Signup"; import { IdentityProviderBrand, diff --git a/src/components/views/location/LocationPicker.tsx b/src/components/views/location/LocationPicker.tsx index 2a05d0678f..b171502a64 100644 --- a/src/components/views/location/LocationPicker.tsx +++ b/src/components/views/location/LocationPicker.tsx @@ -17,8 +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/matrix"; -import { ClientEvent, IClientWellKnown } from "matrix-js-sdk/src/client"; +import { RoomMember, ClientEvent, IClientWellKnown } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; diff --git a/src/components/views/location/LocationViewDialog.tsx b/src/components/views/location/LocationViewDialog.tsx index 48222c0e34..d275253cf3 100644 --- a/src/components/views/location/LocationViewDialog.tsx +++ b/src/components/views/location/LocationViewDialog.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import BaseDialog from "../dialogs/BaseDialog"; import { locationEventGeoUri, isSelfLocation } from "../../../utils/location"; diff --git a/src/components/views/location/shareLocation.ts b/src/components/views/location/shareLocation.ts index 4209a7ab78..e9d21473d5 100644 --- a/src/components/views/location/shareLocation.ts +++ b/src/components/views/location/shareLocation.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { IContent, IEventRelation } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, IContent, IEventRelation } from "matrix-js-sdk/src/matrix"; import { MatrixError } from "matrix-js-sdk/src/http-api"; import { makeLocationContent, makeBeaconInfoContent } from "matrix-js-sdk/src/content-helpers"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/messages/MImageBody.tsx b/src/components/views/messages/MImageBody.tsx index 3a4c23030b..6833a53018 100644 --- a/src/components/views/messages/MImageBody.tsx +++ b/src/components/views/messages/MImageBody.tsx @@ -20,7 +20,7 @@ import { Blurhash } from "react-blurhash"; import classNames from "classnames"; import { CSSTransition, SwitchTransition } from "react-transition-group"; import { logger } from "matrix-js-sdk/src/logger"; -import { ClientEvent, ClientEventHandlerMap } from "matrix-js-sdk/src/client"; +import { ClientEvent, ClientEventHandlerMap } from "matrix-js-sdk/src/matrix"; import MFileBody from "./MFileBody"; import Modal from "../../../Modal"; diff --git a/src/components/views/messages/RedactedBody.tsx b/src/components/views/messages/RedactedBody.tsx index 1486465203..1389f048d4 100644 --- a/src/components/views/messages/RedactedBody.tsx +++ b/src/components/views/messages/RedactedBody.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { ForwardRefExoticComponent, useContext } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; diff --git a/src/components/views/polls/pollHistory/PollHistory.tsx b/src/components/views/polls/pollHistory/PollHistory.tsx index 0b7347a178..ec1f97d816 100644 --- a/src/components/views/polls/pollHistory/PollHistory.tsx +++ b/src/components/views/polls/pollHistory/PollHistory.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { useState } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent, Poll, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, MatrixEvent, Poll, Room } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../../languageHandler"; import { PollHistoryList } from "./PollHistoryList"; diff --git a/src/components/views/polls/pollHistory/fetchPastPolls.ts b/src/components/views/polls/pollHistory/fetchPastPolls.ts index e97755874d..2252a368fc 100644 --- a/src/components/views/polls/pollHistory/fetchPastPolls.ts +++ b/src/components/views/polls/pollHistory/fetchPastPolls.ts @@ -16,8 +16,7 @@ limitations under the License. import { useCallback, useEffect, useState } from "react"; import { M_POLL_START } from "matrix-js-sdk/src/@types/polls"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Direction, EventTimeline, EventTimelineSet, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, Direction, EventTimeline, EventTimelineSet, Room } from "matrix-js-sdk/src/matrix"; import { Filter, IFilterDefinition } from "matrix-js-sdk/src/filter"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/components/views/polls/pollHistory/usePollHistory.ts b/src/components/views/polls/pollHistory/usePollHistory.ts index dafb241f19..111f22b46f 100644 --- a/src/components/views/polls/pollHistory/usePollHistory.ts +++ b/src/components/views/polls/pollHistory/usePollHistory.ts @@ -15,8 +15,7 @@ limitations under the License. */ import { useEffect, useState } from "react"; -import { Poll, PollEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Poll, PollEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { useEventEmitterState } from "../../../../hooks/useEventEmitter"; diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index 7eff6d96f1..b75d7f8719 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -19,8 +19,17 @@ limitations under the License. import React, { ReactNode, useCallback, useContext, useEffect, useMemo, useState } from "react"; import classNames from "classnames"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { RoomMember, Room, RoomStateEvent, MatrixEvent, User, Device, EventType } from "matrix-js-sdk/src/matrix"; +import { + ClientEvent, + MatrixClient, + RoomMember, + Room, + RoomStateEvent, + MatrixEvent, + User, + Device, + EventType, +} from "matrix-js-sdk/src/matrix"; import { VerificationRequest } from "matrix-js-sdk/src/crypto-api"; import { logger } from "matrix-js-sdk/src/logger"; import { CryptoEvent } from "matrix-js-sdk/src/crypto"; diff --git a/src/components/views/rooms/LinkPreviewGroup.tsx b/src/components/views/rooms/LinkPreviewGroup.tsx index dc0451b6a1..a87e91fb52 100644 --- a/src/components/views/rooms/LinkPreviewGroup.tsx +++ b/src/components/views/rooms/LinkPreviewGroup.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { useContext, useEffect } from "react"; -import { MatrixEvent, MatrixError } from "matrix-js-sdk/src/matrix"; -import { IPreviewUrlResponse, MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixEvent, MatrixError, IPreviewUrlResponse, MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { useStateToggle } from "../../../hooks/useStateToggle"; diff --git a/src/components/views/rooms/LinkPreviewWidget.tsx b/src/components/views/rooms/LinkPreviewWidget.tsx index 41cf4672f2..227bb38dce 100644 --- a/src/components/views/rooms/LinkPreviewWidget.tsx +++ b/src/components/views/rooms/LinkPreviewWidget.tsx @@ -16,8 +16,7 @@ limitations under the License. import React, { ComponentProps, createRef, ReactNode } from "react"; import { decode } from "html-entities"; -import { MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { IPreviewUrlResponse } from "matrix-js-sdk/src/client"; +import { MatrixEvent, IPreviewUrlResponse } from "matrix-js-sdk/src/matrix"; import { Linkify } from "../../../HtmlUtils"; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/rooms/MemberList.tsx b/src/components/views/rooms/MemberList.tsx index b24b3b137a..2d5ac957a3 100644 --- a/src/components/views/rooms/MemberList.tsx +++ b/src/components/views/rooms/MemberList.tsx @@ -30,9 +30,9 @@ import { UserEvent, JoinRule, EventType, + ClientEvent, } from "matrix-js-sdk/src/matrix"; import { throttle } from "lodash"; -import { ClientEvent } from "matrix-js-sdk/src/client"; import { _t } from "../../../languageHandler"; import dis from "../../../dispatcher/dispatcher"; diff --git a/src/components/views/rooms/MessageComposerButtons.tsx b/src/components/views/rooms/MessageComposerButtons.tsx index 5766cb3093..c88eb45991 100644 --- a/src/components/views/rooms/MessageComposerButtons.tsx +++ b/src/components/views/rooms/MessageComposerButtons.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import classNames from "classnames"; -import { IEventRelation, Room } from "matrix-js-sdk/src/matrix"; +import { IEventRelation, Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { M_POLL_START } from "matrix-js-sdk/src/@types/polls"; import React, { createContext, ReactElement, ReactNode, useContext, useRef } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/rooms/NewRoomIntro.tsx b/src/components/views/rooms/NewRoomIntro.tsx index 1e2e2c50ba..e03576b07a 100644 --- a/src/components/views/rooms/NewRoomIntro.tsx +++ b/src/components/views/rooms/NewRoomIntro.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { useContext } from "react"; -import { EventType, Room, User } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { EventType, Room, User, MatrixClient } from "matrix-js-sdk/src/matrix"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import RoomContext from "../../../contexts/RoomContext"; diff --git a/src/components/views/rooms/RoomInfoLine.tsx b/src/components/views/rooms/RoomInfoLine.tsx index a18cc81301..50eede9df4 100644 --- a/src/components/views/rooms/RoomInfoLine.tsx +++ b/src/components/views/rooms/RoomInfoLine.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { FC } from "react"; -import { Room, JoinRule } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Room, JoinRule, MatrixClient } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import RightPanelStore from "../../../stores/right-panel/RightPanelStore"; diff --git a/src/components/views/rooms/RoomListHeader.tsx b/src/components/views/rooms/RoomListHeader.tsx index f1f4f26d60..4640fb07f3 100644 --- a/src/components/views/rooms/RoomListHeader.tsx +++ b/src/components/views/rooms/RoomListHeader.tsx @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { EventType, RoomType, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; -import { ClientEvent } from "matrix-js-sdk/src/client"; +import { EventType, RoomType, Room, RoomEvent, ClientEvent } 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/Stickerpicker.tsx b/src/components/views/rooms/Stickerpicker.tsx index fe51cbf43b..bf19beb224 100644 --- a/src/components/views/rooms/Stickerpicker.tsx +++ b/src/components/views/rooms/Stickerpicker.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import React from "react"; -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, ClientEvent } 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"; import { _t, _td } from "../../../languageHandler"; import AppTile from "../elements/AppTile"; diff --git a/src/components/views/settings/ChangePassword.tsx b/src/components/views/settings/ChangePassword.tsx index 4c3f51eda8..3e50b6a50e 100644 --- a/src/components/views/settings/ChangePassword.tsx +++ b/src/components/views/settings/ChangePassword.tsx @@ -16,7 +16,7 @@ limitations under the License. */ import React from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import type ExportE2eKeysDialog from "../../../async-components/views/dialogs/security/ExportE2eKeysDialog"; import Field from "../elements/Field"; diff --git a/src/components/views/settings/tabs/user/SessionManagerTab.tsx b/src/components/views/settings/tabs/user/SessionManagerTab.tsx index 1c338681fc..9be48848cc 100644 --- a/src/components/views/settings/tabs/user/SessionManagerTab.tsx +++ b/src/components/views/settings/tabs/user/SessionManagerTab.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React, { useCallback, useContext, useEffect, useRef, useState } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } 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/SpaceSettingsGeneralTab.tsx b/src/components/views/spaces/SpaceSettingsGeneralTab.tsx index 7bf4ee8998..94c55495bc 100644 --- a/src/components/views/spaces/SpaceSettingsGeneralTab.tsx +++ b/src/components/views/spaces/SpaceSettingsGeneralTab.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { useState } from "react"; -import { Room, EventType } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Room, EventType, MatrixClient } 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/SpaceSettingsVisibilityTab.tsx b/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx index e4dde79cea..75df665b90 100644 --- a/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx +++ b/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React, { useState } from "react"; -import { Room, EventType, GuestAccess, HistoryVisibility, JoinRule } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Room, EventType, GuestAccess, HistoryVisibility, JoinRule, MatrixClient } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; import AccessibleButton from "../elements/AccessibleButton"; diff --git a/src/contexts/MatrixClientContext.tsx b/src/contexts/MatrixClientContext.tsx index 4830e29198..12aef02a73 100644 --- a/src/contexts/MatrixClientContext.tsx +++ b/src/contexts/MatrixClientContext.tsx @@ -23,7 +23,7 @@ import React, { useContext, RefAttributes, } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; // This context is available to components under LoggedInView, // the context must not be used by components outside a MatrixClientContext tree. diff --git a/src/customisations/Media.ts b/src/customisations/Media.ts index d9e3bb3d20..8116ed13ee 100644 --- a/src/customisations/Media.ts +++ b/src/customisations/Media.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { ResizeMethod } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, ResizeMethod } from "matrix-js-sdk/src/matrix"; import { Optional } from "matrix-events-sdk"; import { MatrixClientPeg } from "../MatrixClientPeg"; diff --git a/src/editor/parts.ts b/src/editor/parts.ts index 2a119d2750..970093c43f 100644 --- a/src/editor/parts.ts +++ b/src/editor/parts.ts @@ -16,8 +16,7 @@ limitations under the License. */ import EMOJIBASE_REGEX from "emojibase-regex"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { RoomMember, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, RoomMember, Room } from "matrix-js-sdk/src/matrix"; import GraphemeSplitter from "graphemer"; import AutocompleteWrapperModel, { GetAutocompleterComponent, UpdateCallback, UpdateQuery } from "./autocomplete"; diff --git a/src/events/EventTileFactory.tsx b/src/events/EventTileFactory.tsx index 1b06ad83b1..96206aaec3 100644 --- a/src/events/EventTileFactory.tsx +++ b/src/events/EventTileFactory.tsx @@ -15,10 +15,9 @@ limitations under the License. */ import React from "react"; -import { MatrixEvent, EventType, MsgType, RelationType } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, EventType, MsgType, RelationType, MatrixClient } from "matrix-js-sdk/src/matrix"; import { Optional } from "matrix-events-sdk"; import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls"; -import { MatrixClient } from "matrix-js-sdk/src/client"; import { GroupCallIntent } from "matrix-js-sdk/src/webrtc/groupCall"; import SettingsStore from "../settings/SettingsStore"; diff --git a/src/hooks/useAccountData.ts b/src/hooks/useAccountData.ts index 335513a506..b9399c25ea 100644 --- a/src/hooks/useAccountData.ts +++ b/src/hooks/useAccountData.ts @@ -15,8 +15,7 @@ limitations under the License. */ import { useCallback, useState } from "react"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; +import { ClientEvent, MatrixClient, MatrixEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { useTypedEventEmitter } from "./useEventEmitter"; diff --git a/src/hooks/useIsEncrypted.ts b/src/hooks/useIsEncrypted.ts index 88ba1ec20d..b46fb571fb 100644 --- a/src/hooks/useIsEncrypted.ts +++ b/src/hooks/useIsEncrypted.ts @@ -15,8 +15,7 @@ limitations under the License. */ import { useCallback, useState } from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent, Room, RoomStateEvent, EventType } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, MatrixEvent, Room, RoomStateEvent, EventType } from "matrix-js-sdk/src/matrix"; import { useTypedEventEmitter } from "./useEventEmitter"; diff --git a/src/hooks/usePublicRoomDirectory.ts b/src/hooks/usePublicRoomDirectory.ts index 3b15b9d7ab..f514497785 100644 --- a/src/hooks/usePublicRoomDirectory.ts +++ b/src/hooks/usePublicRoomDirectory.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { RoomType } from "matrix-js-sdk/src/matrix"; +import { RoomType, IProtocol, IPublicRoomsChunkRoom } from "matrix-js-sdk/src/matrix"; import { IRoomDirectoryOptions } from "matrix-js-sdk/src/@types/requests"; -import { IProtocol, IPublicRoomsChunkRoom } from "matrix-js-sdk/src/client"; import { useCallback, useEffect, useState } from "react"; import { IPublicRoomDirectoryConfig } from "../components/views/directory/NetworkDropdown"; diff --git a/src/indexing/EventIndex.ts b/src/indexing/EventIndex.ts index d4fdb6918f..8c1d82a47f 100644 --- a/src/indexing/EventIndex.ts +++ b/src/indexing/EventIndex.ts @@ -27,12 +27,13 @@ import { EventTimelineSet, IRoomTimelineData, EventType, + ClientEvent, + MatrixClient, } from "matrix-js-sdk/src/matrix"; 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"; import { logger } from "matrix-js-sdk/src/logger"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync"; import { HTTPError } from "matrix-js-sdk/src/http-api"; diff --git a/src/integrations/IntegrationManagers.ts b/src/integrations/IntegrationManagers.ts index f3d0f951d7..21a6124951 100644 --- a/src/integrations/IntegrationManagers.ts +++ b/src/integrations/IntegrationManagers.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { logger } from "matrix-js-sdk/src/logger"; -import { ClientEvent, IClientWellKnown, MatrixClient } from "matrix-js-sdk/src/client"; +import { ClientEvent, IClientWellKnown, MatrixClient } from "matrix-js-sdk/src/matrix"; import { compare } from "matrix-js-sdk/src/utils"; import type { MatrixEvent } from "matrix-js-sdk/src/matrix"; diff --git a/src/models/Call.ts b/src/models/Call.ts index 9f467d9c29..3a84fe59af 100644 --- a/src/models/Call.ts +++ b/src/models/Call.ts @@ -14,10 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { TypedEventEmitter, RoomEvent, RoomStateEvent, EventType } from "matrix-js-sdk/src/matrix"; +import { TypedEventEmitter, RoomEvent, RoomStateEvent, EventType, MatrixClient } 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 { CallType } from "matrix-js-sdk/src/webrtc/call"; import { NamespacedValue } from "matrix-js-sdk/src/NamespacedValue"; import { IWidgetApiRequest, MatrixWidgetType } from "matrix-widget-api"; @@ -30,8 +29,7 @@ import { } from "matrix-js-sdk/src/webrtc/groupCall"; import type EventEmitter from "events"; -import type { IMyDevice } from "matrix-js-sdk/src/client"; -import type { Room, RoomMember } from "matrix-js-sdk/src/matrix"; +import type { IMyDevice, 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/sentry.ts b/src/sentry.ts index b92e61ac8f..99ac1b97ab 100644 --- a/src/sentry.ts +++ b/src/sentry.ts @@ -15,7 +15,7 @@ limitations under the License. */ import * as Sentry from "@sentry/browser"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import SdkConfig from "./SdkConfig"; import { MatrixClientPeg } from "./MatrixClientPeg"; diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index b3af440b1a..ceed24d183 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -15,7 +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 { MatrixClient } from "matrix-js-sdk/src/matrix"; import React, { ReactNode } from "react"; import { _t, _td } from "../languageHandler"; diff --git a/src/settings/controllers/MatrixClientBackedController.ts b/src/settings/controllers/MatrixClientBackedController.ts index 6a68e729d0..1df6fc8d9e 100644 --- a/src/settings/controllers/MatrixClientBackedController.ts +++ b/src/settings/controllers/MatrixClientBackedController.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import SettingController from "./SettingController"; diff --git a/src/settings/handlers/AccountSettingsHandler.ts b/src/settings/handlers/AccountSettingsHandler.ts index 16f8138e3b..e931a92600 100644 --- a/src/settings/handlers/AccountSettingsHandler.ts +++ b/src/settings/handlers/AccountSettingsHandler.ts @@ -15,8 +15,7 @@ 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 } from "matrix-js-sdk/src/matrix"; +import { ClientEvent, MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { defer } from "matrix-js-sdk/src/utils"; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; diff --git a/src/settings/handlers/MatrixClientBackedSettingsHandler.ts b/src/settings/handlers/MatrixClientBackedSettingsHandler.ts index c5f385c2b7..87e18a07b2 100644 --- a/src/settings/handlers/MatrixClientBackedSettingsHandler.ts +++ b/src/settings/handlers/MatrixClientBackedSettingsHandler.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import SettingsHandler from "./SettingsHandler"; diff --git a/src/settings/handlers/RoomAccountSettingsHandler.ts b/src/settings/handlers/RoomAccountSettingsHandler.ts index 49beb79ad3..43c4859013 100644 --- a/src/settings/handlers/RoomAccountSettingsHandler.ts +++ b/src/settings/handlers/RoomAccountSettingsHandler.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 { MatrixEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, MatrixEvent, Room, RoomEvent } from "matrix-js-sdk/src/matrix"; import { defer } from "matrix-js-sdk/src/utils"; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; diff --git a/src/settings/handlers/RoomSettingsHandler.ts b/src/settings/handlers/RoomSettingsHandler.ts index ca5b8cbd88..12c3124365 100644 --- a/src/settings/handlers/RoomSettingsHandler.ts +++ b/src/settings/handlers/RoomSettingsHandler.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 { MatrixEvent, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, MatrixEvent, RoomState, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { defer } from "matrix-js-sdk/src/utils"; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; diff --git a/src/stores/AsyncStoreWithClient.ts b/src/stores/AsyncStoreWithClient.ts index 0056920921..a4c8311391 100644 --- a/src/stores/AsyncStoreWithClient.ts +++ b/src/stores/AsyncStoreWithClient.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { AsyncStore } from "./AsyncStore"; import { ActionPayload } from "../dispatcher/payloads"; diff --git a/src/stores/BreadcrumbsStore.ts b/src/stores/BreadcrumbsStore.ts index b7251ef94e..bacbfe97be 100644 --- a/src/stores/BreadcrumbsStore.ts +++ b/src/stores/BreadcrumbsStore.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room, RoomEvent } from "matrix-js-sdk/src/matrix"; +import { Room, RoomEvent, ClientEvent } from "matrix-js-sdk/src/matrix"; import { isNullOrUndefined } from "matrix-js-sdk/src/utils"; -import { ClientEvent } from "matrix-js-sdk/src/client"; import SettingsStore from "../settings/SettingsStore"; import { AsyncStoreWithClient } from "./AsyncStoreWithClient"; diff --git a/src/stores/ReadyWatchingStore.ts b/src/stores/ReadyWatchingStore.ts index cfb3ad2c19..10e9082526 100644 --- a/src/stores/ReadyWatchingStore.ts +++ b/src/stores/ReadyWatchingStore.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { SyncState } from "matrix-js-sdk/src/sync"; import { EventEmitter } from "events"; diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index 9d759b56ec..4280e71947 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -14,10 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; +import { Room, RoomStateEvent, MatrixEvent, ClientEvent } from "matrix-js-sdk/src/matrix"; import { IWidget } from "matrix-widget-api"; import { logger } from "matrix-js-sdk/src/logger"; -import { ClientEvent } from "matrix-js-sdk/src/client"; import { ActionPayload } from "../dispatcher/payloads"; import { AsyncStoreWithClient } from "./AsyncStoreWithClient"; diff --git a/src/stores/local-echo/GenericEchoChamber.ts b/src/stores/local-echo/GenericEchoChamber.ts index 2470c583da..be552aebdf 100644 --- a/src/stores/local-echo/GenericEchoChamber.ts +++ b/src/stores/local-echo/GenericEchoChamber.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { EventEmitter } from "events"; import { EchoContext } from "./EchoContext"; diff --git a/src/stores/notifications/RoomNotificationState.ts b/src/stores/notifications/RoomNotificationState.ts index a0cde093fd..052aacc4ae 100644 --- a/src/stores/notifications/RoomNotificationState.ts +++ b/src/stores/notifications/RoomNotificationState.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEventEvent, RoomEvent } from "matrix-js-sdk/src/matrix"; -import { ClientEvent } from "matrix-js-sdk/src/client"; +import { MatrixEventEvent, RoomEvent, ClientEvent } from "matrix-js-sdk/src/matrix"; import type { Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; import type { IDestroyable } from "../../utils/IDestroyable"; diff --git a/src/stores/notifications/RoomNotificationStateStore.ts b/src/stores/notifications/RoomNotificationStateStore.ts index f681d9e05e..c483584077 100644 --- a/src/stores/notifications/RoomNotificationStateStore.ts +++ b/src/stores/notifications/RoomNotificationStateStore.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room } from "matrix-js-sdk/src/matrix"; +import { Room, ClientEvent } from "matrix-js-sdk/src/matrix"; import { SyncState } from "matrix-js-sdk/src/sync"; -import { ClientEvent } from "matrix-js-sdk/src/client"; import { ActionPayload } from "../../dispatcher/payloads"; import { AsyncStoreWithClient } from "../AsyncStoreWithClient"; diff --git a/src/stores/oidc/OidcClientStore.ts b/src/stores/oidc/OidcClientStore.ts index 9ca96d9b63..8393bd5053 100644 --- a/src/stores/oidc/OidcClientStore.ts +++ b/src/stores/oidc/OidcClientStore.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { IDelegatedAuthConfig, MatrixClient, M_AUTHENTICATION } from "matrix-js-sdk/src/client"; +import { IDelegatedAuthConfig, MatrixClient, M_AUTHENTICATION } from "matrix-js-sdk/src/matrix"; import { discoverAndValidateAuthenticationConfig } from "matrix-js-sdk/src/oidc/discovery"; import { logger } from "matrix-js-sdk/src/logger"; import { OidcClient } from "oidc-client-ts"; diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts index c1d5804b1d..562d421962 100644 --- a/src/stores/room-list/RoomListStore.ts +++ b/src/stores/room-list/RoomListStore.ts @@ -14,8 +14,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, RoomState, EventType } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, Room, RoomState, EventType } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import SettingsStore from "../../settings/SettingsStore"; diff --git a/src/stores/spaces/SpaceStore.ts b/src/stores/spaces/SpaceStore.ts index fa3e8ec48b..0d2b7eab66 100644 --- a/src/stores/spaces/SpaceStore.ts +++ b/src/stores/spaces/SpaceStore.ts @@ -23,8 +23,8 @@ import { RoomMember, RoomStateEvent, MatrixEvent, + ClientEvent, } from "matrix-js-sdk/src/matrix"; -import { ClientEvent } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; import { ISendEventResponse } from "matrix-js-sdk/src/@types/requests"; diff --git a/src/stores/widgets/StopGapWidget.ts b/src/stores/widgets/StopGapWidget.ts index 6cfbea400f..8187ae2973 100644 --- a/src/stores/widgets/StopGapWidget.ts +++ b/src/stores/widgets/StopGapWidget.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Room, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; +import { Room, MatrixEvent, MatrixEventEvent, MatrixClient, ClientEvent } from "matrix-js-sdk/src/matrix"; import { ClientWidgetApi, IModalWidgetOpenRequest, @@ -35,7 +35,6 @@ import { } from "matrix-widget-api"; import { Optional } from "matrix-events-sdk"; import { EventEmitter } from "events"; -import { MatrixClient, ClientEvent } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; import { _t, getUserLanguage } from "../../languageHandler"; diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 96c9e453db..4b5b6662e2 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -33,8 +33,15 @@ import { WidgetKind, ISearchUserDirectoryResult, } from "matrix-widget-api"; -import { ClientEvent, ITurnServer as IClientTurnServer } from "matrix-js-sdk/src/client"; -import { EventType, IContent, MatrixEvent, Room, Direction } from "matrix-js-sdk/src/matrix"; +import { + ClientEvent, + ITurnServer as IClientTurnServer, + EventType, + IContent, + MatrixEvent, + Room, + Direction, +} from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; import { diff --git a/src/utils/AutoDiscoveryUtils.tsx b/src/utils/AutoDiscoveryUtils.tsx index 3e24a8d346..24b09b9397 100644 --- a/src/utils/AutoDiscoveryUtils.tsx +++ b/src/utils/AutoDiscoveryUtils.tsx @@ -16,9 +16,8 @@ limitations under the License. import React, { ReactNode } from "react"; import { AutoDiscovery, ClientConfig, OidcClientConfig } from "matrix-js-sdk/src/autodiscovery"; -import { M_AUTHENTICATION } from "matrix-js-sdk/src/client"; +import { M_AUTHENTICATION, IClientWellKnown } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { IClientWellKnown } from "matrix-js-sdk/src/matrix"; import { _t, UserFriendlyError } from "../languageHandler"; import SdkConfig from "../SdkConfig"; diff --git a/src/utils/DMRoomMap.ts b/src/utils/DMRoomMap.ts index 9709462be0..dc232d862e 100644 --- a/src/utils/DMRoomMap.ts +++ b/src/utils/DMRoomMap.ts @@ -15,8 +15,7 @@ limitations under the License. */ import { uniq } from "lodash"; -import { Room, MatrixEvent, EventType } from "matrix-js-sdk/src/matrix"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; +import { Room, MatrixEvent, EventType, ClientEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { Optional } from "matrix-events-sdk"; diff --git a/src/utils/DirectoryUtils.ts b/src/utils/DirectoryUtils.ts index a74cf6d7f9..5ecc97a244 100644 --- a/src/utils/DirectoryUtils.ts +++ b/src/utils/DirectoryUtils.ts @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { IProtocol } from "matrix-js-sdk/src/client"; +import { IProtocol } from "matrix-js-sdk/src/matrix"; export type Protocols = Record; diff --git a/src/utils/EventUtils.ts b/src/utils/EventUtils.ts index 7f8a039612..f08ce38870 100644 --- a/src/utils/EventUtils.ts +++ b/src/utils/EventUtils.ts @@ -21,8 +21,8 @@ import { EVENT_VISIBILITY_CHANGE_TYPE, MsgType, RelationType, + MatrixClient, } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls"; import { M_LOCATION } from "matrix-js-sdk/src/@types/location"; diff --git a/src/utils/MultiInviter.ts b/src/utils/MultiInviter.ts index 5e1784fda8..ce8142f6bd 100644 --- a/src/utils/MultiInviter.ts +++ b/src/utils/MultiInviter.ts @@ -17,8 +17,7 @@ limitations under the License. import { MatrixError } from "matrix-js-sdk/src/http-api"; import { defer, IDeferred } from "matrix-js-sdk/src/utils"; import { logger } from "matrix-js-sdk/src/logger"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { EventType, HistoryVisibility } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, EventType, HistoryVisibility } from "matrix-js-sdk/src/matrix"; import { AddressType, getAddressType } from "../UserAddress"; import { _t } from "../languageHandler"; diff --git a/src/utils/RoomUpgrade.ts b/src/utils/RoomUpgrade.ts index 949b7dcff1..7a5857ea62 100644 --- a/src/utils/RoomUpgrade.ts +++ b/src/utils/RoomUpgrade.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room, EventType } from "matrix-js-sdk/src/matrix"; +import { Room, EventType, ClientEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; import { inviteUsersToRoom } from "../RoomInvite"; import Modal, { IHandle } from "../Modal"; diff --git a/src/utils/ShieldUtils.ts b/src/utils/ShieldUtils.ts index 6baca161ff..d43f1568a5 100644 --- a/src/utils/ShieldUtils.ts +++ b/src/utils/ShieldUtils.ts @@ -14,8 +14,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/matrix"; +import { MatrixClient, Room } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import DMRoomMap from "./DMRoomMap"; diff --git a/src/utils/ValidatedServerConfig.ts b/src/utils/ValidatedServerConfig.ts index b41ac6a642..f46737207e 100644 --- a/src/utils/ValidatedServerConfig.ts +++ b/src/utils/ValidatedServerConfig.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { OidcClientConfig } from "matrix-js-sdk/src/autodiscovery"; -import { IDelegatedAuthConfig } from "matrix-js-sdk/src/client"; +import { IDelegatedAuthConfig } from "matrix-js-sdk/src/matrix"; import { ValidatedIssuerConfig } from "matrix-js-sdk/src/oidc/validate"; export type ValidatedDelegatedAuthConfig = IDelegatedAuthConfig & ValidatedIssuerConfig; diff --git a/src/utils/WellKnownUtils.ts b/src/utils/WellKnownUtils.ts index adcbde83e0..94669ff3dd 100644 --- a/src/utils/WellKnownUtils.ts +++ b/src/utils/WellKnownUtils.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { IClientWellKnown, MatrixClient } from "matrix-js-sdk/src/client"; +import { IClientWellKnown, MatrixClient } from "matrix-js-sdk/src/matrix"; import { UnstableValue } from "matrix-js-sdk/src/NamespacedValue"; const CALL_BEHAVIOUR_WK_KEY = "io.element.call_behaviour"; diff --git a/src/utils/crypto/shouldSkipSetupEncryption.ts b/src/utils/crypto/shouldSkipSetupEncryption.ts index 24a1dbee83..6dfcda7e72 100644 --- a/src/utils/crypto/shouldSkipSetupEncryption.ts +++ b/src/utils/crypto/shouldSkipSetupEncryption.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { shouldForceDisableEncryption } from "./shouldForceDisableEncryption"; diff --git a/src/utils/device/clientInformation.ts b/src/utils/device/clientInformation.ts index 4b7d8e60e0..d3423ab3cc 100644 --- a/src/utils/device/clientInformation.ts +++ b/src/utils/device/clientInformation.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import BasePlatform from "../../BasePlatform"; import { IConfigOptions } from "../../IConfigOptions"; diff --git a/src/utils/direct-messages.ts b/src/utils/direct-messages.ts index fcfb042903..13c028652e 100644 --- a/src/utils/direct-messages.ts +++ b/src/utils/direct-messages.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; +import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { canEncryptToAllUsers } from "../createRoom"; diff --git a/src/utils/membership.ts b/src/utils/membership.ts index 03a6a4a3c1..2977062029 100644 --- a/src/utils/membership.ts +++ b/src/utils/membership.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Room, RoomMember, RoomState, RoomStateEvent, MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Room, RoomMember, RoomState, RoomStateEvent, MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; /** * Approximation of a membership status for a given room. diff --git a/src/utils/notifications.ts b/src/utils/notifications.ts index bb0fb18853..1e6ca3e841 100644 --- a/src/utils/notifications.ts +++ b/src/utils/notifications.ts @@ -14,8 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { LOCAL_NOTIFICATION_SETTINGS_PREFIX, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; +import { + MatrixClient, + LOCAL_NOTIFICATION_SETTINGS_PREFIX, + NotificationCountType, + Room, +} from "matrix-js-sdk/src/matrix"; import { LocalNotificationSettings } from "matrix-js-sdk/src/@types/local_notifications"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; diff --git a/src/utils/pushRules/monitorSyncedPushRules.ts b/src/utils/pushRules/monitorSyncedPushRules.ts index 9061d74a8f..55fcdc563b 100644 --- a/src/utils/pushRules/monitorSyncedPushRules.ts +++ b/src/utils/pushRules/monitorSyncedPushRules.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent, EventType } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, MatrixEvent, EventType } from "matrix-js-sdk/src/matrix"; import { PushProcessor } from "matrix-js-sdk/src/pushprocessor"; import { RuleId, IAnnotatedPushRule } from "matrix-js-sdk/src/@types/PushRules"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/src/utils/pushRules/updatePushRuleActions.ts b/src/utils/pushRules/updatePushRuleActions.ts index e4ea970c39..71d704fa62 100644 --- a/src/utils/pushRules/updatePushRuleActions.ts +++ b/src/utils/pushRules/updatePushRuleActions.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { IPushRule, PushRuleAction, PushRuleKind } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, IPushRule, PushRuleAction, PushRuleKind } from "matrix-js-sdk/src/matrix"; import { PushProcessor } from "matrix-js-sdk/src/pushprocessor"; /** diff --git a/src/utils/read-receipts.ts b/src/utils/read-receipts.ts index c6dbbcb7ec..04b6ead201 100644 --- a/src/utils/read-receipts.ts +++ b/src/utils/read-receipts.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { isSupportedReceiptType } from "matrix-js-sdk/src/utils"; /** diff --git a/src/widgets/Jitsi.ts b/src/widgets/Jitsi.ts index eecab5ab67..ca602ec150 100644 --- a/src/widgets/Jitsi.ts +++ b/src/widgets/Jitsi.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { logger } from "matrix-js-sdk/src/logger"; -import { ClientEvent, IClientWellKnown } from "matrix-js-sdk/src/client"; +import { ClientEvent, IClientWellKnown } from "matrix-js-sdk/src/matrix"; import SdkConfig from "../SdkConfig"; import { MatrixClientPeg } from "../MatrixClientPeg"; diff --git a/test/Notifier-test.ts b/test/Notifier-test.ts index 89a52f5517..7d996bbe7c 100644 --- a/test/Notifier-test.ts +++ b/test/Notifier-test.ts @@ -15,8 +15,16 @@ limitations under the License. */ import { mocked, MockedObject } from "jest-mock"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; -import { Room, RoomEvent, EventType, MsgType, IContent, MatrixEvent } from "matrix-js-sdk/src/matrix"; +import { + ClientEvent, + MatrixClient, + Room, + RoomEvent, + EventType, + MsgType, + IContent, + MatrixEvent, +} from "matrix-js-sdk/src/matrix"; import { SyncState } from "matrix-js-sdk/src/sync"; import { waitFor } from "@testing-library/react"; diff --git a/test/components/structures/LoggedInView-test.tsx b/test/components/structures/LoggedInView-test.tsx index 6c9a3abb65..36598c9c98 100644 --- a/test/components/structures/LoggedInView-test.tsx +++ b/test/components/structures/LoggedInView-test.tsx @@ -16,8 +16,7 @@ limitations under the License. import React from "react"; import { render, RenderResult } from "@testing-library/react"; -import { ConditionKind, EventType, IPushRule, MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { ClientEvent } from "matrix-js-sdk/src/client"; +import { ConditionKind, EventType, IPushRule, MatrixEvent, ClientEvent } from "matrix-js-sdk/src/matrix"; import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler"; import { logger } from "matrix-js-sdk/src/logger"; diff --git a/test/components/structures/MatrixChat-test.tsx b/test/components/structures/MatrixChat-test.tsx index 91cb477c02..b2c47ab268 100644 --- a/test/components/structures/MatrixChat-test.tsx +++ b/test/components/structures/MatrixChat-test.tsx @@ -18,11 +18,10 @@ import React, { ComponentProps } from "react"; import { fireEvent, render, RenderResult, screen, within } from "@testing-library/react"; import fetchMock from "fetch-mock-jest"; import { mocked } from "jest-mock"; -import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client"; +import { ClientEvent, MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { SyncState } from "matrix-js-sdk/src/sync"; import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler"; import * as MatrixJs from "matrix-js-sdk/src/matrix"; -import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { completeAuthorizationCodeGrant } from "matrix-js-sdk/src/oidc/authorize"; import { logger } from "matrix-js-sdk/src/logger"; import { OidcError } from "matrix-js-sdk/src/oidc/error"; diff --git a/test/components/structures/PipContainer-test.tsx b/test/components/structures/PipContainer-test.tsx index 3f56ec18e1..765c7a1dff 100644 --- a/test/components/structures/PipContainer-test.tsx +++ b/test/components/structures/PipContainer-test.tsx @@ -18,8 +18,7 @@ import React from "react"; 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, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, PendingEventOrdering, 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"; diff --git a/test/components/structures/RightPanel-test.tsx b/test/components/structures/RightPanel-test.tsx index 69a45d96f2..7ae471a23b 100644 --- a/test/components/structures/RightPanel-test.tsx +++ b/test/components/structures/RightPanel-test.tsx @@ -19,7 +19,7 @@ import { render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { jest } from "@jest/globals"; import { mocked, MockedObject } from "jest-mock"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import _RightPanel from "../../../src/components/structures/RightPanel"; import { MatrixClientPeg } from "../../../src/MatrixClientPeg"; diff --git a/test/components/structures/RoomStatusBar-test.tsx b/test/components/structures/RoomStatusBar-test.tsx index 5bd3140e74..efbb7f60de 100644 --- a/test/components/structures/RoomStatusBar-test.tsx +++ b/test/components/structures/RoomStatusBar-test.tsx @@ -16,8 +16,7 @@ limitations under the License. import React from "react"; import { render } from "@testing-library/react"; -import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { EventStatus, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, PendingEventOrdering, EventStatus, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { MatrixError } from "matrix-js-sdk/src/http-api"; import RoomStatusBar, { getUnsentMessages } from "../../../src/components/structures/RoomStatusBar"; diff --git a/test/components/structures/RoomView-test.tsx b/test/components/structures/RoomView-test.tsx index 4cb34645e3..8a9e385e8b 100644 --- a/test/components/structures/RoomView-test.tsx +++ b/test/components/structures/RoomView-test.tsx @@ -16,8 +16,9 @@ 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 { + ClientEvent, + MatrixClient, Room, RoomEvent, EventType, diff --git a/test/components/structures/SpaceHierarchy-test.tsx b/test/components/structures/SpaceHierarchy-test.tsx index 62bef5ba2a..685fbc7d0d 100644 --- a/test/components/structures/SpaceHierarchy-test.tsx +++ b/test/components/structures/SpaceHierarchy-test.tsx @@ -17,8 +17,7 @@ limitations under the License. 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/matrix"; +import { MatrixClient, 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 86b25d8dce..00208338a6 100644 --- a/test/components/structures/ThreadView-test.tsx +++ b/test/components/structures/ThreadView-test.tsx @@ -17,8 +17,15 @@ limitations under the License. import { act, getByTestId, render, RenderResult, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; -import { MsgType, RelationType, EventStatus, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; -import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { + MsgType, + RelationType, + EventStatus, + MatrixEvent, + Room, + MatrixClient, + PendingEventOrdering, +} 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 4a9aa58dfc..a7a5c7b169 100644 --- a/test/components/views/avatars/MemberAvatar-test.tsx +++ b/test/components/views/avatars/MemberAvatar-test.tsx @@ -16,8 +16,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, RoomMember } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, PendingEventOrdering, 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/context_menus/RoomContextMenu-test.tsx b/test/components/views/context_menus/RoomContextMenu-test.tsx index 8faed698f5..243031fae3 100644 --- a/test/components/views/context_menus/RoomContextMenu-test.tsx +++ b/test/components/views/context_menus/RoomContextMenu-test.tsx @@ -19,8 +19,7 @@ limitations under the License. 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/matrix"; +import { MatrixClient, PendingEventOrdering, 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 d6afe9168c..e24d2dc086 100644 --- a/test/components/views/context_menus/RoomGeneralContextMenu-test.tsx +++ b/test/components/views/context_menus/RoomGeneralContextMenu-test.tsx @@ -17,8 +17,7 @@ limitations under the License. import { fireEvent, getByLabelText, render, screen } from "@testing-library/react"; 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/matrix"; +import { MatrixClient, PendingEventOrdering, 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 616be7bd50..01bf71041d 100644 --- a/test/components/views/context_menus/ThreadListContextMenu-test.tsx +++ b/test/components/views/context_menus/ThreadListContextMenu-test.tsx @@ -17,8 +17,7 @@ limitations under the License. import { getByTestId, render, screen } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { mocked } from "jest-mock"; -import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, PendingEventOrdering, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import ThreadListContextMenu, { diff --git a/test/components/views/context_menus/WidgetContextMenu-test.tsx b/test/components/views/context_menus/WidgetContextMenu-test.tsx index 8d7872d489..f2da9c2647 100644 --- a/test/components/views/context_menus/WidgetContextMenu-test.tsx +++ b/test/components/views/context_menus/WidgetContextMenu-test.tsx @@ -18,7 +18,7 @@ limitations under the License. import React, { ComponentProps } from "react"; import { screen, render } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { MatrixWidgetType } from "matrix-widget-api"; import { ApprovalOpts, diff --git a/test/components/views/dialogs/DevtoolsDialog-test.tsx b/test/components/views/dialogs/DevtoolsDialog-test.tsx index 8da2fc0482..6a46a707f8 100644 --- a/test/components/views/dialogs/DevtoolsDialog-test.tsx +++ b/test/components/views/dialogs/DevtoolsDialog-test.tsx @@ -16,8 +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/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import userEvent from "@testing-library/user-event"; import { stubClient } from "../../../test-utils"; diff --git a/test/components/views/dialogs/ManualDeviceKeyVerificationDialog-test.tsx b/test/components/views/dialogs/ManualDeviceKeyVerificationDialog-test.tsx index 39f8b75a6b..c411c2caa4 100644 --- a/test/components/views/dialogs/ManualDeviceKeyVerificationDialog-test.tsx +++ b/test/components/views/dialogs/ManualDeviceKeyVerificationDialog-test.tsx @@ -16,8 +16,7 @@ import React from "react"; import { render, screen } from "@testing-library/react"; -import { Device } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Device, MatrixClient } from "matrix-js-sdk/src/matrix"; import { stubClient } from "../../../test-utils"; import { ManualDeviceKeyVerificationDialog } from "../../../../src/components/views/dialogs/ManualDeviceKeyVerificationDialog"; diff --git a/test/components/views/dialogs/devtools/Event-test.tsx b/test/components/views/dialogs/devtools/Event-test.tsx index 03a57a63a9..06db415cc2 100644 --- a/test/components/views/dialogs/devtools/Event-test.tsx +++ b/test/components/views/dialogs/devtools/Event-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/matrix"; -import { PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { Room, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg"; diff --git a/test/components/views/dialogs/devtools/RoomNotifications-test.tsx b/test/components/views/dialogs/devtools/RoomNotifications-test.tsx index 94e846321a..ce448eaba3 100644 --- a/test/components/views/dialogs/devtools/RoomNotifications-test.tsx +++ b/test/components/views/dialogs/devtools/RoomNotifications-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/matrix"; -import { PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { Room, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; import RoomNotifications from "../../../../../src/components/views/dialogs/devtools/RoomNotifications"; import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext"; diff --git a/test/components/views/dialogs/spotlight/PublicRoomResultDetails-test.tsx b/test/components/views/dialogs/spotlight/PublicRoomResultDetails-test.tsx index 86175fc217..dd0486c6b8 100644 --- a/test/components/views/dialogs/spotlight/PublicRoomResultDetails-test.tsx +++ b/test/components/views/dialogs/spotlight/PublicRoomResultDetails-test.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { render } from "@testing-library/react"; -import { IPublicRoomsChunkRoom } from "matrix-js-sdk/src/client"; +import { IPublicRoomsChunkRoom } from "matrix-js-sdk/src/matrix"; import { PublicRoomResultDetails } from "../../../../../src/components/views/dialogs/spotlight/PublicRoomResultDetails"; diff --git a/test/components/views/dialogs/spotlight/RoomResultContextMenus-test.tsx b/test/components/views/dialogs/spotlight/RoomResultContextMenus-test.tsx index 068de66349..a548520d00 100644 --- a/test/components/views/dialogs/spotlight/RoomResultContextMenus-test.tsx +++ b/test/components/views/dialogs/spotlight/RoomResultContextMenus-test.tsx @@ -18,8 +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/matrix"; -import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { Room, MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; import { RoomResultContextMenus } from "../../../../../src/components/views/dialogs/spotlight/RoomResultContextMenus"; import { filterConsole, stubClient } from "../../../../test-utils"; diff --git a/test/components/views/location/LocationPicker-test.tsx b/test/components/views/location/LocationPicker-test.tsx index 70c1d84770..dd33d942d1 100644 --- a/test/components/views/location/LocationPicker-test.tsx +++ b/test/components/views/location/LocationPicker-test.tsx @@ -17,8 +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/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { RoomMember, MatrixClient } from "matrix-js-sdk/src/matrix"; 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 53873b983a..a5510712ff 100644 --- a/test/components/views/location/LocationShareMenu-test.tsx +++ b/test/components/views/location/LocationShareMenu-test.tsx @@ -16,8 +16,7 @@ limitations under the License. import React from "react"; import { mocked } from "jest-mock"; -import { RoomMember, RelationType } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { RoomMember, RelationType, MatrixClient } 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 1d6255f8a6..8f5c99a2b0 100644 --- a/test/components/views/messages/CallEvent-test.tsx +++ b/test/components/views/messages/CallEvent-test.tsx @@ -17,8 +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, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { Room, RoomStateEvent, MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; import { ClientWidgetApi, Widget } from "matrix-widget-api"; import type { RoomMember } from "matrix-js-sdk/src/matrix"; diff --git a/test/components/views/messages/DateSeparator-test.tsx b/test/components/views/messages/DateSeparator-test.tsx index ff00cf44e9..fcec96faa9 100644 --- a/test/components/views/messages/DateSeparator-test.tsx +++ b/test/components/views/messages/DateSeparator-test.tsx @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import { mocked } from "jest-mock"; import { fireEvent, render, screen } from "@testing-library/react"; -import { TimestampToEventResponse } from "matrix-js-sdk/src/client"; +import { TimestampToEventResponse } from "matrix-js-sdk/src/matrix"; import { ConnectionError, HTTPError, MatrixError } from "matrix-js-sdk/src/http-api"; import dispatcher from "../../../../src/dispatcher/dispatcher"; diff --git a/test/components/views/right_panel/LegacyRoomHeaderButtons-test.tsx b/test/components/views/right_panel/LegacyRoomHeaderButtons-test.tsx index fe92bb54e3..0ed8968c9c 100644 --- a/test/components/views/right_panel/LegacyRoomHeaderButtons-test.tsx +++ b/test/components/views/right_panel/LegacyRoomHeaderButtons-test.tsx @@ -15,8 +15,15 @@ limitations under the License. */ import { render } from "@testing-library/react"; -import { MatrixEvent, MsgType, RelationType, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; -import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { + MatrixEvent, + MsgType, + RelationType, + NotificationCountType, + Room, + MatrixClient, + PendingEventOrdering, +} from "matrix-js-sdk/src/matrix"; 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 a087f7515a..80d8804fb7 100644 --- a/test/components/views/rooms/EventTile-test.tsx +++ b/test/components/views/rooms/EventTile-test.tsx @@ -17,8 +17,16 @@ limitations under the License. import * as React from "react"; import { render, waitFor, screen, act, fireEvent } from "@testing-library/react"; import { mocked } from "jest-mock"; -import { EventType, CryptoApi, TweakName, NotificationCountType, Room, MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { + EventType, + CryptoApi, + TweakName, + NotificationCountType, + Room, + MatrixEvent, + MatrixClient, + PendingEventOrdering, +} from "matrix-js-sdk/src/matrix"; import { DeviceTrustLevel, UserTrustLevel } from "matrix-js-sdk/src/crypto/CrossSigning"; import { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo"; import { IEncryptedEventInfo } from "matrix-js-sdk/src/crypto/api"; diff --git a/test/components/views/rooms/LegacyRoomHeader-test.tsx b/test/components/views/rooms/LegacyRoomHeader-test.tsx index e3338f00be..ebd96264ea 100644 --- a/test/components/views/rooms/LegacyRoomHeader-test.tsx +++ b/test/components/views/rooms/LegacyRoomHeader-test.tsx @@ -17,15 +17,13 @@ limitations under the License. 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, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { EventType, RoomType, Room, RoomStateEvent, PendingEventOrdering } from "matrix-js-sdk/src/matrix"; import { CallType } from "matrix-js-sdk/src/webrtc/call"; import { ClientWidgetApi, Widget } from "matrix-widget-api"; import EventEmitter from "events"; import { ISearchResults } from "matrix-js-sdk/src/@types/search"; -import type { MatrixClient } from "matrix-js-sdk/src/client"; -import type { MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix"; +import type { MatrixClient, MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix"; import type { MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import { stubClient, diff --git a/test/components/views/rooms/NotificationBadge/UnreadNotificationBadge-test.tsx b/test/components/views/rooms/NotificationBadge/UnreadNotificationBadge-test.tsx index aca09b9d7e..e281b2d303 100644 --- a/test/components/views/rooms/NotificationBadge/UnreadNotificationBadge-test.tsx +++ b/test/components/views/rooms/NotificationBadge/UnreadNotificationBadge-test.tsx @@ -17,11 +17,18 @@ limitations under the License. import React from "react"; import "jest-mock"; import { screen, act, render } from "@testing-library/react"; -import { MatrixEvent, MsgType, RelationType, NotificationCountType, Room, EventStatus } from "matrix-js-sdk/src/matrix"; -import { PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { + MatrixEvent, + MsgType, + RelationType, + NotificationCountType, + Room, + EventStatus, + PendingEventOrdering, +} from "matrix-js-sdk/src/matrix"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; -import type { MatrixClient } from "matrix-js-sdk/src/client"; +import type { MatrixClient } from "matrix-js-sdk/src/matrix"; import { mkThread } from "../../../../test-utils/threads"; import { UnreadNotificationBadge } from "../../../../../src/components/views/rooms/NotificationBadge/UnreadNotificationBadge"; import { mkEvent, mkMessage, muteRoom, stubClient } from "../../../../test-utils/test-utils"; diff --git a/test/components/views/rooms/RoomListHeader-test.tsx b/test/components/views/rooms/RoomListHeader-test.tsx index 53b994a9a0..47cceedd20 100644 --- a/test/components/views/rooms/RoomListHeader-test.tsx +++ b/test/components/views/rooms/RoomListHeader-test.tsx @@ -15,8 +15,7 @@ limitations under the License. */ import React from "react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Room, EventType } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, Room, EventType } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; import { act, render, screen, fireEvent, RenderResult } from "@testing-library/react"; diff --git a/test/components/views/rooms/RoomPreviewCard-test.tsx b/test/components/views/rooms/RoomPreviewCard-test.tsx index 1aeca307dd..c062497ec8 100644 --- a/test/components/views/rooms/RoomPreviewCard-test.tsx +++ b/test/components/views/rooms/RoomPreviewCard-test.tsx @@ -17,11 +17,9 @@ limitations under the License. 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, RoomStateEvent, RoomType } from "matrix-js-sdk/src/matrix"; +import { PendingEventOrdering, Room, RoomStateEvent, RoomType } from "matrix-js-sdk/src/matrix"; -import type { MatrixClient } from "matrix-js-sdk/src/client"; -import type { RoomMember } from "matrix-js-sdk/src/matrix"; +import type { MatrixClient, 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 3fde2b9544..1ec1b2d040 100644 --- a/test/components/views/rooms/RoomTile-test.tsx +++ b/test/components/views/rooms/RoomTile-test.tsx @@ -17,8 +17,7 @@ limitations under the License. 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, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, PendingEventOrdering, Room, MatrixEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { Widget } from "matrix-widget-api"; import { Thread } from "matrix-js-sdk/src/models/thread"; diff --git a/test/components/views/settings/discovery/EmailAddresses-test.tsx b/test/components/views/settings/discovery/EmailAddresses-test.tsx index 8ff76cd3c0..f2465e3ca5 100644 --- a/test/components/views/settings/discovery/EmailAddresses-test.tsx +++ b/test/components/views/settings/discovery/EmailAddresses-test.tsx @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import { fireEvent, render, screen } from "@testing-library/react"; import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids"; -import { IRequestTokenResponse } from "matrix-js-sdk/src/client"; +import { IRequestTokenResponse } from "matrix-js-sdk/src/matrix"; import { MatrixError } from "matrix-js-sdk/src/http-api"; import { UserFriendlyError } from "../../../../../src/languageHandler"; diff --git a/test/components/views/settings/tabs/room/AdvancedRoomSettingsTab-test.tsx b/test/components/views/settings/tabs/room/AdvancedRoomSettingsTab-test.tsx index 4152f168c3..d255144144 100644 --- a/test/components/views/settings/tabs/room/AdvancedRoomSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/AdvancedRoomSettingsTab-test.tsx @@ -16,8 +16,7 @@ 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, EventType, MatrixEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, Room, EventType, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; import AdvancedRoomSettingsTab from "../../../../../../src/components/views/settings/tabs/room/AdvancedRoomSettingsTab"; diff --git a/test/components/views/settings/tabs/room/NotificationSettingsTab-test.tsx b/test/components/views/settings/tabs/room/NotificationSettingsTab-test.tsx index 9f7c7ed484..0ed688b032 100644 --- a/test/components/views/settings/tabs/room/NotificationSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/NotificationSettingsTab-test.tsx @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import { render, RenderResult, screen } from "@testing-library/react"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import userEvent from "@testing-library/user-event"; import NotificationSettingsTab from "../../../../../../src/components/views/settings/tabs/room/NotificationSettingsTab"; diff --git a/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx b/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx index 8ab253ab65..0a9c8406f1 100644 --- a/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/RolesRoomSettingsTab-test.tsx @@ -16,8 +16,7 @@ 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 { EventType, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, EventType, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; import RolesRoomSettingsTab from "../../../../../../src/components/views/settings/tabs/room/RolesRoomSettingsTab"; diff --git a/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx b/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx index 2912a47e36..d61e635cee 100644 --- a/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx +++ b/test/components/views/settings/tabs/room/VoipRoomSettingsTab-test.tsx @@ -16,8 +16,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, MatrixEvent, EventType, JoinRule } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, Room, MatrixEvent, EventType, JoinRule } from "matrix-js-sdk/src/matrix"; import { mkStubRoom, stubClient } from "../../../../../test-utils"; import { MatrixClientPeg } from "../../../../../../src/MatrixClientPeg"; diff --git a/test/components/views/voip/CallView-test.tsx b/test/components/views/voip/CallView-test.tsx index d794e1bf19..d7ee94ed03 100644 --- a/test/components/views/voip/CallView-test.tsx +++ b/test/components/views/voip/CallView-test.tsx @@ -18,8 +18,7 @@ import React from "react"; 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, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, PendingEventOrdering, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { Widget } from "matrix-widget-api"; import type { RoomMember } from "matrix-js-sdk/src/matrix"; diff --git a/test/components/views/voip/VideoFeed-test.tsx b/test/components/views/voip/VideoFeed-test.tsx index 495e591c73..bb4e2c1a25 100644 --- a/test/components/views/voip/VideoFeed-test.tsx +++ b/test/components/views/voip/VideoFeed-test.tsx @@ -18,8 +18,7 @@ import React from "react"; 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/matrix"; +import { MatrixClient, 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 0ee74088b6..5041364794 100644 --- a/test/models/Call-test.ts +++ b/test/models/Call-test.ts @@ -17,14 +17,12 @@ limitations under the License. import EventEmitter from "events"; import { mocked } from "jest-mock"; import { waitFor } from "@testing-library/react"; -import { RoomType, Room, RoomEvent, MatrixEvent, RoomStateEvent } from "matrix-js-sdk/src/matrix"; -import { PendingEventOrdering } from "matrix-js-sdk/src/client"; +import { RoomType, Room, RoomEvent, MatrixEvent, RoomStateEvent, PendingEventOrdering } 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/matrix"; +import type { MatrixClient, IMyDevice, RoomMember } from "matrix-js-sdk/src/matrix"; import type { ClientWidgetApi } from "matrix-widget-api"; import { JitsiCallMemberContent, diff --git a/test/settings/handlers/DeviceSettingsHandler-test.ts b/test/settings/handlers/DeviceSettingsHandler-test.ts index ec3bce41f8..ca94367cba 100644 --- a/test/settings/handlers/DeviceSettingsHandler-test.ts +++ b/test/settings/handlers/DeviceSettingsHandler-test.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { mocked } from "jest-mock"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { MatrixClientPeg } from "../../../src/MatrixClientPeg"; import DeviceSettingsHandler from "../../../src/settings/handlers/DeviceSettingsHandler"; diff --git a/test/stores/oidc/OidcClientStore-test.ts b/test/stores/oidc/OidcClientStore-test.ts index 9fe8a9d6a8..ea2dcac997 100644 --- a/test/stores/oidc/OidcClientStore-test.ts +++ b/test/stores/oidc/OidcClientStore-test.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { mocked } from "jest-mock"; -import { M_AUTHENTICATION } from "matrix-js-sdk/src/client"; +import { M_AUTHENTICATION } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { discoverAndValidateAuthenticationConfig } from "matrix-js-sdk/src/oidc/discovery"; import { OidcError } from "matrix-js-sdk/src/oidc/error"; diff --git a/test/stores/right-panel/RightPanelStore-test.ts b/test/stores/right-panel/RightPanelStore-test.ts index 284fd8deb1..f6abecfb13 100644 --- a/test/stores/right-panel/RightPanelStore-test.ts +++ b/test/stores/right-panel/RightPanelStore-test.ts @@ -15,8 +15,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/matrix"; +import { MatrixClient, 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 a6c7accd69..d7c5d2614c 100644 --- a/test/stores/room-list/algorithms/Algorithm-test.ts +++ b/test/stores/room-list/algorithms/Algorithm-test.ts @@ -15,11 +15,10 @@ limitations under the License. */ import { mocked, MockedObject } from "jest-mock"; -import { PendingEventOrdering } from "matrix-js-sdk/src/client"; -import { Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; +import { PendingEventOrdering, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix"; import { Widget } from "matrix-widget-api"; -import type { MatrixClient } from "matrix-js-sdk/src/client"; +import type { MatrixClient } from "matrix-js-sdk/src/matrix"; import type { ClientWidgetApi } from "matrix-widget-api"; import { stubClient, setupAsyncStoreWithClient, useMockedCalls, MockedCall } from "../../../test-utils"; import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; diff --git a/test/stores/room-list/algorithms/list-ordering/NaturalAlgorithm-test.ts b/test/stores/room-list/algorithms/list-ordering/NaturalAlgorithm-test.ts index 46bef644cf..b9f7dd1b0d 100644 --- a/test/stores/room-list/algorithms/list-ordering/NaturalAlgorithm-test.ts +++ b/test/stores/room-list/algorithms/list-ordering/NaturalAlgorithm-test.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ConditionKind, EventType, MatrixEvent, PushRuleActionName, Room } from "matrix-js-sdk/src/matrix"; -import { ClientEvent } from "matrix-js-sdk/src/client"; +import { ConditionKind, EventType, MatrixEvent, PushRuleActionName, Room, ClientEvent } from "matrix-js-sdk/src/matrix"; import { logger } from "matrix-js-sdk/src/logger"; import { NaturalAlgorithm } from "../../../../../src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm"; diff --git a/test/stores/widgets/StopGapWidget-test.ts b/test/stores/widgets/StopGapWidget-test.ts index 080be9f53a..f7f7b96993 100644 --- a/test/stores/widgets/StopGapWidget-test.ts +++ b/test/stores/widgets/StopGapWidget-test.ts @@ -16,8 +16,7 @@ limitations under the License. import { mocked, MockedObject } from "jest-mock"; import { last } from "lodash"; -import { MatrixEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient, ClientEvent } from "matrix-js-sdk/src/client"; +import { MatrixEvent, MatrixClient, ClientEvent } from "matrix-js-sdk/src/matrix"; import { ClientWidgetApi } from "matrix-widget-api"; import { stubClient, mkRoom, mkEvent } from "../../test-utils"; diff --git a/test/stores/widgets/StopGapWidgetDriver-test.ts b/test/stores/widgets/StopGapWidgetDriver-test.ts index b3d11f4b9b..15c88ba297 100644 --- a/test/stores/widgets/StopGapWidgetDriver-test.ts +++ b/test/stores/widgets/StopGapWidgetDriver-test.ts @@ -15,9 +15,17 @@ limitations under the License. */ import { mocked, MockedObject } from "jest-mock"; -import { MatrixClient, ClientEvent, ITurnServer as IClientTurnServer } from "matrix-js-sdk/src/client"; +import { + MatrixClient, + ClientEvent, + ITurnServer as IClientTurnServer, + Direction, + EventType, + MatrixEvent, + MsgType, + RelationType, +} from "matrix-js-sdk/src/matrix"; import { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo"; -import { Direction, EventType, MatrixEvent, MsgType, RelationType } from "matrix-js-sdk/src/matrix"; import { Widget, MatrixWidgetType, diff --git a/test/test-utils/poll.ts b/test/test-utils/poll.ts index 9e11f46e8d..76ca4b4680 100644 --- a/test/test-utils/poll.ts +++ b/test/test-utils/poll.ts @@ -15,8 +15,7 @@ limitations under the License. */ import { Mocked } from "jest-mock"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { M_POLL_START, PollAnswer, diff --git a/test/toasts/IncomingCallToast-test.tsx b/test/toasts/IncomingCallToast-test.tsx index 360a238d93..739775fe9c 100644 --- a/test/toasts/IncomingCallToast-test.tsx +++ b/test/toasts/IncomingCallToast-test.tsx @@ -17,8 +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, RoomStateEvent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { Room, RoomStateEvent, MatrixEvent, MatrixEventEvent, MatrixClient } from "matrix-js-sdk/src/matrix"; import { ClientWidgetApi, Widget } from "matrix-widget-api"; import type { RoomMember } from "matrix-js-sdk/src/matrix"; diff --git a/test/utils/AutoDiscoveryUtils-test.tsx b/test/utils/AutoDiscoveryUtils-test.tsx index e8e5f87dc1..8741677194 100644 --- a/test/utils/AutoDiscoveryUtils-test.tsx +++ b/test/utils/AutoDiscoveryUtils-test.tsx @@ -16,7 +16,7 @@ limitations under the License. import { AutoDiscovery, AutoDiscoveryAction, ClientConfig } from "matrix-js-sdk/src/autodiscovery"; import { logger } from "matrix-js-sdk/src/logger"; -import { M_AUTHENTICATION } from "matrix-js-sdk/src/client"; +import { M_AUTHENTICATION } from "matrix-js-sdk/src/matrix"; import AutoDiscoveryUtils from "../../src/utils/AutoDiscoveryUtils"; diff --git a/test/utils/leave-behaviour-test.ts b/test/utils/leave-behaviour-test.ts index 704fde72c5..48117caf48 100644 --- a/test/utils/leave-behaviour-test.ts +++ b/test/utils/leave-behaviour-test.ts @@ -15,8 +15,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/matrix"; +import { MatrixClient, 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 f777ac36c1..ace6422732 100644 --- a/test/utils/notifications-test.ts +++ b/test/utils/notifications-test.ts @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MatrixEvent, NotificationCountType, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixEvent, NotificationCountType, Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { Mocked, mocked } from "jest-mock"; -import { MatrixClient } from "matrix-js-sdk/src/client"; import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts"; import { diff --git a/test/voice-broadcast/utils/isRelatedToVoiceBroadcast-test.ts b/test/voice-broadcast/utils/isRelatedToVoiceBroadcast-test.ts index ce5c61e5b8..e2b8ef9104 100644 --- a/test/voice-broadcast/utils/isRelatedToVoiceBroadcast-test.ts +++ b/test/voice-broadcast/utils/isRelatedToVoiceBroadcast-test.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { EventType, MatrixEvent, RelationType, Room } from "matrix-js-sdk/src/matrix"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { EventType, MatrixEvent, RelationType, Room, MatrixClient } from "matrix-js-sdk/src/matrix"; import { mocked } from "jest-mock"; import { isRelatedToVoiceBroadcast, VoiceBroadcastInfoState } from "../../../src/voice-broadcast"; diff --git a/test/voice-broadcast/utils/retrieveStartedInfoEvent-test.ts b/test/voice-broadcast/utils/retrieveStartedInfoEvent-test.ts index f699008c95..fde5b1a277 100644 --- a/test/voice-broadcast/utils/retrieveStartedInfoEvent-test.ts +++ b/test/voice-broadcast/utils/retrieveStartedInfoEvent-test.ts @@ -15,8 +15,7 @@ limitations under the License. */ import { mocked } from "jest-mock"; -import { MatrixClient } from "matrix-js-sdk/src/client"; -import { MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; +import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; import { retrieveStartedInfoEvent, diff --git a/test/voice-broadcast/utils/textForVoiceBroadcastStoppedEventWithoutLink-test.ts b/test/voice-broadcast/utils/textForVoiceBroadcastStoppedEventWithoutLink-test.ts index 8f17e3c43a..c874fa0341 100644 --- a/test/voice-broadcast/utils/textForVoiceBroadcastStoppedEventWithoutLink-test.ts +++ b/test/voice-broadcast/utils/textForVoiceBroadcastStoppedEventWithoutLink-test.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { mocked } from "jest-mock"; -import { MatrixClient } from "matrix-js-sdk/src/client"; +import { MatrixClient } from "matrix-js-sdk/src/matrix"; import { textForVoiceBroadcastStoppedEventWithoutLink, VoiceBroadcastInfoState } from "../../../src/voice-broadcast"; import { stubClient } from "../../test-utils";