From d56f0f2a25985f31df177c70ca87983bd921c0d6 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 19 Dec 2019 18:19:56 -0700 Subject: [PATCH 1/5] Convert many imports to handle ES6 exports Reliant upon https://github.com/matrix-org/matrix-react-sdk/pull/3761 --- src/AddThreepid.js | 2 +- src/Analytics.js | 2 +- src/CallHandler.js | 2 +- src/ContentMessages.js | 2 +- src/CrossSigningManager.js | 2 +- src/Entities.js | 2 +- src/GroupAddressPicker.js | 2 +- src/IdentityAuthClient.js | 2 +- src/KeyRequestHandler.js | 2 +- src/Lifecycle.js | 2 +- src/MatrixClientPeg.js | 2 +- src/Modal.js | 2 +- src/Notifier.js | 6 +++--- src/Registration.js | 2 +- src/RoomInvite.js | 2 +- src/SlashCommands.js | 2 +- src/Terms.js | 2 +- src/actions/RoomListActions.js | 2 +- src/async-components/views/dialogs/ExportE2eKeysDialog.js | 2 +- src/async-components/views/dialogs/ImportE2eKeysDialog.js | 2 +- .../views/dialogs/keybackup/CreateKeyBackupDialog.js | 2 +- .../views/dialogs/keybackup/IgnoreRecoveryReminderDialog.js | 2 +- .../views/dialogs/keybackup/NewRecoveryMethodDialog.js | 2 +- .../views/dialogs/keybackup/RecoveryMethodRemovedDialog.js | 2 +- .../dialogs/secretstorage/CreateSecretStorageDialog.js | 2 +- src/autocomplete/CommunityProvider.js | 2 +- src/autocomplete/NotifProvider.js | 2 +- src/autocomplete/RoomProvider.js | 2 +- src/autocomplete/UserProvider.js | 2 +- src/components/structures/ContextMenu.js | 2 +- src/components/structures/CustomRoomTagPanel.js | 2 +- src/components/structures/EmbeddedPage.js | 2 +- src/components/structures/FilePanel.js | 2 +- src/components/structures/GroupView.js | 2 +- src/components/structures/InteractiveAuth.js | 2 +- src/components/structures/LeftPanel.js | 4 ++-- src/components/structures/LoggedInView.js | 2 +- src/components/structures/MatrixChat.js | 2 +- src/components/structures/MessagePanel.js | 2 +- src/components/structures/MyGroups.js | 2 +- src/components/structures/RightPanel.js | 2 +- src/components/structures/RoomStatusBar.js | 2 +- src/components/structures/RoomSubList.js | 4 ++-- src/components/structures/RoomView.js | 4 ++-- src/components/structures/TabbedView.js | 2 +- src/components/structures/TagPanel.js | 2 +- src/components/structures/TagPanelButtons.js | 2 +- src/components/structures/TimelinePanel.js | 2 +- src/components/structures/TopLeftMenuButton.js | 2 +- src/components/structures/UserView.js | 2 +- src/components/structures/ViewSource.js | 2 +- src/components/structures/auth/ForgotPassword.js | 2 +- src/components/structures/auth/Login.js | 2 +- src/components/structures/auth/PostRegistration.js | 2 +- src/components/structures/auth/Registration.js | 2 +- src/components/structures/auth/SoftLogout.js | 2 +- src/components/views/auth/AuthHeader.js | 2 +- src/components/views/auth/AuthPage.js | 2 +- src/components/views/auth/CountryDropdown.js | 2 +- src/components/views/auth/InteractiveAuthEntryComponents.js | 2 +- src/components/views/auth/LanguageSelector.js | 2 +- src/components/views/auth/ModularServerConfig.js | 2 +- src/components/views/auth/PasswordLogin.js | 2 +- src/components/views/auth/RegistrationForm.js | 4 ++-- src/components/views/auth/ServerConfig.js | 2 +- src/components/views/auth/ServerTypeSelector.js | 2 +- src/components/views/auth/SignInToText.js | 2 +- src/components/views/auth/Welcome.js | 2 +- src/components/views/avatars/BaseAvatar.js | 2 +- src/components/views/avatars/GroupAvatar.js | 2 +- src/components/views/avatars/MemberAvatar.js | 2 +- src/components/views/avatars/RoomAvatar.js | 4 ++-- .../views/context_menus/GroupInviteTileContextMenu.js | 2 +- src/components/views/context_menus/MessageContextMenu.js | 2 +- src/components/views/context_menus/RoomTileContextMenu.js | 2 +- .../views/context_menus/StatusMessageContextMenu.js | 2 +- src/components/views/context_menus/TagTileContextMenu.js | 2 +- src/components/views/dialogs/AddressPickerDialog.js | 2 +- src/components/views/dialogs/AskInviteAnywayDialog.js | 2 +- src/components/views/dialogs/BugReportDialog.js | 2 +- src/components/views/dialogs/ChangelogDialog.js | 2 +- src/components/views/dialogs/ConfirmAndWaitRedactDialog.js | 2 +- src/components/views/dialogs/ConfirmRedactDialog.js | 2 +- src/components/views/dialogs/ConfirmUserActionDialog.js | 2 +- src/components/views/dialogs/ConfirmWipeDeviceDialog.js | 2 +- src/components/views/dialogs/CreateGroupDialog.js | 2 +- src/components/views/dialogs/CreateRoomDialog.js | 2 +- src/components/views/dialogs/CryptoStoreTooNewDialog.js | 2 +- src/components/views/dialogs/DeactivateAccountDialog.js | 2 +- src/components/views/dialogs/DeviceVerifyDialog.js | 2 +- src/components/views/dialogs/DevtoolsDialog.js | 2 +- src/components/views/dialogs/ErrorDialog.js | 2 +- src/components/views/dialogs/IncomingSasDialog.js | 2 +- src/components/views/dialogs/InfoDialog.js | 2 +- src/components/views/dialogs/IntegrationsDisabledDialog.js | 2 +- .../views/dialogs/IntegrationsImpossibleDialog.js | 2 +- src/components/views/dialogs/InteractiveAuthDialog.js | 2 +- src/components/views/dialogs/KeyShareDialog.js | 2 +- src/components/views/dialogs/LogoutDialog.js | 2 +- src/components/views/dialogs/MessageEditHistoryDialog.js | 2 +- src/components/views/dialogs/QuestionDialog.js | 2 +- src/components/views/dialogs/ReportEventDialog.js | 2 +- src/components/views/dialogs/RoomSettingsDialog.js | 2 +- src/components/views/dialogs/RoomUpgradeDialog.js | 2 +- src/components/views/dialogs/RoomUpgradeWarningDialog.js | 2 +- src/components/views/dialogs/SessionRestoreErrorDialog.js | 2 +- src/components/views/dialogs/SetEmailDialog.js | 4 ++-- src/components/views/dialogs/SetMxIdDialog.js | 2 +- src/components/views/dialogs/SetPasswordDialog.js | 2 +- src/components/views/dialogs/ShareDialog.js | 2 +- src/components/views/dialogs/SlashCommandHelpDialog.js | 2 +- src/components/views/dialogs/StorageEvictedDialog.js | 2 +- .../views/dialogs/TabbedIntegrationManagerDialog.js | 4 ++-- src/components/views/dialogs/TermsDialog.js | 2 +- src/components/views/dialogs/TextInputDialog.js | 2 +- src/components/views/dialogs/UnknownDeviceDialog.js | 2 +- src/components/views/dialogs/UploadConfirmDialog.js | 2 +- src/components/views/dialogs/UploadFailureDialog.js | 2 +- src/components/views/dialogs/UserSettingsDialog.js | 2 +- .../views/dialogs/WidgetOpenIDPermissionsDialog.js | 2 +- .../views/dialogs/keybackup/RestoreKeyBackupDialog.js | 2 +- .../dialogs/secretstorage/AccessSecretStorageDialog.js | 2 +- src/components/views/elements/AccessibleTooltipButton.js | 2 +- src/components/views/elements/ActionButton.js | 2 +- src/components/views/elements/AddressSelector.js | 2 +- src/components/views/elements/AddressTile.js | 2 +- src/components/views/elements/AppPermission.js | 2 +- src/components/views/elements/AppTile.js | 2 +- src/components/views/elements/CreateRoomButton.js | 2 +- src/components/views/elements/DeviceVerifyButtons.js | 2 +- src/components/views/elements/DirectorySearchBox.js | 2 +- src/components/views/elements/EditableTextContainer.js | 2 +- src/components/views/elements/ErrorBoundary.js | 2 +- src/components/views/elements/Field.js | 2 +- src/components/views/elements/GroupsButton.js | 2 +- src/components/views/elements/LanguageDropdown.js | 2 +- src/components/views/elements/ManageIntegsButton.js | 2 +- src/components/views/elements/MemberEventListSummary.js | 2 +- src/components/views/elements/PersistentApp.js | 2 +- src/components/views/elements/Pill.js | 2 +- src/components/views/elements/ReplyThread.js | 2 +- src/components/views/elements/RoomAliasField.js | 2 +- src/components/views/elements/RoomDirectoryButton.js | 2 +- src/components/views/elements/StartChatButton.js | 2 +- src/components/views/elements/TagTile.js | 2 +- src/components/views/elements/TextWithTooltip.js | 2 +- src/components/views/elements/TooltipButton.js | 2 +- src/components/views/emojipicker/Category.js | 2 +- src/components/views/emojipicker/EmojiPicker.js | 2 +- src/components/views/emojipicker/QuickReactions.js | 2 +- src/components/views/globals/CookieBar.js | 2 +- src/components/views/globals/NewVersionBar.js | 2 +- src/components/views/globals/PasswordNagBar.js | 2 +- src/components/views/groups/GroupInviteTile.js | 2 +- src/components/views/groups/GroupMemberInfo.js | 2 +- src/components/views/groups/GroupMemberList.js | 2 +- src/components/views/groups/GroupMemberTile.js | 2 +- src/components/views/groups/GroupPublicityToggle.js | 2 +- src/components/views/groups/GroupRoomInfo.js | 2 +- src/components/views/groups/GroupRoomList.js | 2 +- src/components/views/groups/GroupRoomTile.js | 2 +- src/components/views/groups/GroupTile.js | 2 +- src/components/views/groups/GroupUserSettings.js | 2 +- src/components/views/messages/EditHistoryMessage.js | 2 +- src/components/views/messages/MFileBody.js | 2 +- src/components/views/messages/MImageBody.js | 2 +- src/components/views/messages/MKeyVerificationRequest.js | 2 +- src/components/views/messages/MStickerBody.js | 2 +- src/components/views/messages/MessageActionBar.js | 2 +- src/components/views/messages/MessageEvent.js | 2 +- src/components/views/messages/ReactionsRow.js | 2 +- src/components/views/messages/ReactionsRowButton.js | 2 +- src/components/views/messages/ReactionsRowButtonTooltip.js | 2 +- src/components/views/messages/RoomAvatarEvent.js | 2 +- src/components/views/messages/TextualBody.js | 2 +- src/components/views/messages/TextualEvent.js | 3 +-- src/components/views/right_panel/UserInfo.js | 4 ++-- src/components/views/room_settings/RelatedGroupSettings.js | 2 +- src/components/views/room_settings/UrlPreviewSettings.js | 2 +- src/components/views/rooms/AppsDrawer.js | 4 ++-- src/components/views/rooms/AuxPanel.js | 4 ++-- src/components/views/rooms/BasicMessageComposer.js | 2 +- src/components/views/rooms/EditMessageComposer.js | 2 +- src/components/views/rooms/EntityTile.js | 2 +- src/components/views/rooms/EventTile.js | 5 ++--- src/components/views/rooms/MemberDeviceInfo.js | 2 +- src/components/views/rooms/MemberInfo.js | 4 ++-- src/components/views/rooms/MessageComposer.js | 2 +- src/components/views/rooms/MessageComposerFormatBar.js | 2 +- src/components/views/rooms/MessageComposerInput.js | 2 +- src/components/views/rooms/ReplyPreview.js | 2 +- src/components/views/rooms/RoomBreadcrumbs.js | 2 +- src/components/views/rooms/RoomDetailList.js | 2 +- src/components/views/rooms/RoomDetailRow.js | 2 +- src/components/views/rooms/RoomHeader.js | 2 +- src/components/views/rooms/RoomPreviewBar.js | 2 +- src/components/views/rooms/RoomRecoveryReminder.js | 2 +- src/components/views/rooms/RoomTile.js | 2 +- src/components/views/rooms/RoomTopicEditor.js | 2 +- src/components/views/rooms/RoomUpgradeWarningBar.js | 2 +- src/components/views/rooms/SearchResultTile.js | 2 +- src/components/views/rooms/SearchableEntityList.js | 2 +- src/components/views/rooms/SendMessageComposer.js | 2 +- src/components/views/rooms/SimpleRoomHeader.js | 2 +- src/components/views/rooms/SlateMessageComposer.js | 2 +- src/components/views/rooms/Stickerpicker.js | 2 +- src/components/views/rooms/ThirdPartyMemberInfo.js | 2 +- src/components/views/rooms/UserTile.js | 2 +- src/components/views/rooms/WhoIsTypingTile.js | 2 +- src/components/views/settings/ChangeAvatar.js | 2 +- src/components/views/settings/ChangeDisplayName.js | 2 +- src/components/views/settings/CrossSigningPanel.js | 2 +- src/components/views/settings/DevicesPanel.js | 2 +- src/components/views/settings/DevicesPanelEntry.js | 2 +- src/components/views/settings/IntegrationManager.js | 2 +- src/components/views/settings/KeyBackupPanel.js | 2 +- src/components/views/settings/Notifications.js | 2 +- src/components/views/settings/SetIdServer.js | 2 +- src/components/views/settings/SetIntegrationManager.js | 2 +- src/components/views/settings/account/EmailAddresses.js | 2 +- src/components/views/settings/account/PhoneNumbers.js | 2 +- src/components/views/settings/discovery/EmailAddresses.js | 2 +- src/components/views/settings/discovery/PhoneNumbers.js | 2 +- .../views/settings/tabs/room/AdvancedRoomSettingsTab.js | 2 +- .../views/settings/tabs/room/GeneralRoomSettingsTab.js | 2 +- .../views/settings/tabs/room/RolesRoomSettingsTab.js | 2 +- .../views/settings/tabs/room/SecurityRoomSettingsTab.js | 2 +- .../views/settings/tabs/user/GeneralUserSettingsTab.js | 2 +- .../views/settings/tabs/user/PreferencesUserSettingsTab.js | 2 +- .../views/settings/tabs/user/SecurityUserSettingsTab.js | 2 +- src/components/views/terms/InlineTermsAgreement.js | 2 +- src/components/views/toasts/VerificationRequestToast.js | 2 +- src/components/views/verification/VerificationCancelled.js | 2 +- src/components/views/verification/VerificationComplete.js | 2 +- src/components/views/verification/VerificationShowSas.js | 2 +- src/components/views/voip/CallPreview.js | 2 +- src/components/views/voip/CallView.js | 2 +- src/components/views/voip/IncomingCallBox.js | 2 +- src/components/views/voip/VideoView.js | 2 +- src/createRoom.js | 2 +- src/cryptodevices.js | 2 +- src/editor/parts.js | 2 +- src/integrations/IntegrationManagerInstance.js | 2 +- src/integrations/IntegrationManagers.js | 2 +- src/stores/RoomListStore.js | 2 +- src/stores/RoomViewStore.js | 2 +- src/utils/MultiInviter.js | 2 +- src/utils/pillify.js | 2 +- src/utils/replaceableComponent.ts | 2 +- 249 files changed, 263 insertions(+), 265 deletions(-) diff --git a/src/AddThreepid.js b/src/AddThreepid.js index 694c2e124c..4d027e4cfb 100644 --- a/src/AddThreepid.js +++ b/src/AddThreepid.js @@ -17,7 +17,7 @@ limitations under the License. */ import MatrixClientPeg from './MatrixClientPeg'; -import sdk from './index'; +import * as sdk from './index'; import Modal from './Modal'; import { _t } from './languageHandler'; import IdentityAuthClient from './IdentityAuthClient'; diff --git a/src/Analytics.js b/src/Analytics.js index 3e208ad6bd..75b547d3d7 100644 --- a/src/Analytics.js +++ b/src/Analytics.js @@ -18,7 +18,7 @@ import { getCurrentLanguage, _t, _td } from './languageHandler'; import PlatformPeg from './PlatformPeg'; import SdkConfig from './SdkConfig'; import Modal from './Modal'; -import sdk from './index'; +import * as sdk from './index'; const hashRegex = /#\/(groups?|room|user|settings|register|login|forgot_password|home|directory)/; const hashVarRegex = /#\/(group|room|user)\/.*$/; diff --git a/src/CallHandler.js b/src/CallHandler.js index ecbf6c2c12..a5e6c34ab3 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -56,7 +56,7 @@ limitations under the License. import MatrixClientPeg from './MatrixClientPeg'; import PlatformPeg from './PlatformPeg'; import Modal from './Modal'; -import sdk from './index'; +import * as sdk from './index'; import { _t } from './languageHandler'; import Matrix from 'matrix-js-sdk'; import dis from './dispatcher'; diff --git a/src/ContentMessages.js b/src/ContentMessages.js index 6908a6a18e..4b8b911cfa 100644 --- a/src/ContentMessages.js +++ b/src/ContentMessages.js @@ -20,7 +20,7 @@ limitations under the License. import extend from './extend'; import dis from './dispatcher'; import MatrixClientPeg from './MatrixClientPeg'; -import sdk from './index'; +import * as sdk from './index'; import { _t } from './languageHandler'; import Modal from './Modal'; import RoomViewStore from './stores/RoomViewStore'; diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index ab0a22e4d5..9f7b9e97ce 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -15,7 +15,7 @@ limitations under the License. */ import Modal from './Modal'; -import sdk from './index'; +import * as sdk from './index'; import MatrixClientPeg from './MatrixClientPeg'; import { deriveKey } from 'matrix-js-sdk/lib/crypto/key_passphrase'; import { decodeRecoveryKey } from 'matrix-js-sdk/lib/crypto/recoverykey'; diff --git a/src/Entities.js b/src/Entities.js index 8be1da0db8..3135953744 100644 --- a/src/Entities.js +++ b/src/Entities.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import sdk from './index'; +import * as sdk from './index'; function isMatch(query, name, uid) { query = query.toLowerCase(); diff --git a/src/GroupAddressPicker.js b/src/GroupAddressPicker.js index 793f5c9227..2d34af01eb 100644 --- a/src/GroupAddressPicker.js +++ b/src/GroupAddressPicker.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import Modal from './Modal'; -import sdk from './'; +import * as sdk from './'; import MultiInviter from './utils/MultiInviter'; import { _t } from './languageHandler'; import MatrixClientPeg from './MatrixClientPeg'; diff --git a/src/IdentityAuthClient.js b/src/IdentityAuthClient.js index c82c93e7a6..a501426865 100644 --- a/src/IdentityAuthClient.js +++ b/src/IdentityAuthClient.js @@ -18,7 +18,7 @@ import { createClient, SERVICE_TYPES } from 'matrix-js-sdk'; import MatrixClientPeg from './MatrixClientPeg'; import Modal from './Modal'; -import sdk from './index'; +import * as sdk from './index'; import { _t } from './languageHandler'; import { Service, startTermsFlow, TermsNotSignedError } from './Terms'; import { diff --git a/src/KeyRequestHandler.js b/src/KeyRequestHandler.js index c3de7988b2..8101d24e6e 100644 --- a/src/KeyRequestHandler.js +++ b/src/KeyRequestHandler.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import sdk from './index'; +import * as sdk from './index'; import Modal from './Modal'; export default class KeyRequestHandler { diff --git a/src/Lifecycle.js b/src/Lifecycle.js index b81b563129..9847c972f4 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -28,7 +28,7 @@ import Presence from './Presence'; import dis from './dispatcher'; import DMRoomMap from './utils/DMRoomMap'; import Modal from './Modal'; -import sdk from './index'; +import * as sdk from './index'; import ActiveWidgetStore from './stores/ActiveWidgetStore'; import PlatformPeg from "./PlatformPeg"; import { sendLoginRequest } from "./Login"; diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 46debab731..974c5b6f51 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -22,7 +22,7 @@ import {MatrixClient, MemoryStore} from 'matrix-js-sdk'; import utils from 'matrix-js-sdk/lib/utils'; import EventTimeline from 'matrix-js-sdk/lib/models/event-timeline'; import EventTimelineSet from 'matrix-js-sdk/lib/models/event-timeline-set'; -import sdk from './index'; +import * as sdk from './index'; import createMatrixClient from './utils/createMatrixClient'; import SettingsStore from './settings/SettingsStore'; import MatrixActionCreators from './actions/MatrixActionCreators'; diff --git a/src/Modal.js b/src/Modal.js index 4fc9fdcb02..29d3af2e74 100644 --- a/src/Modal.js +++ b/src/Modal.js @@ -20,7 +20,7 @@ import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import Analytics from './Analytics'; -import sdk from './index'; +import * as sdk from './index'; import dis from './dispatcher'; import { _t } from './languageHandler'; import {defer} from "./utils/promise"; diff --git a/src/Notifier.js b/src/Notifier.js index dd691d8ca7..73b1eae33c 100644 --- a/src/Notifier.js +++ b/src/Notifier.js @@ -18,11 +18,11 @@ limitations under the License. import MatrixClientPeg from './MatrixClientPeg'; import PlatformPeg from './PlatformPeg'; -import TextForEvent from './TextForEvent'; +import * as TextForEvent from './TextForEvent'; import Analytics from './Analytics'; -import Avatar from './Avatar'; +import * as Avatar from './Avatar'; import dis from './dispatcher'; -import sdk from './index'; +import * as sdk from './index'; import { _t } from './languageHandler'; import Modal from './Modal'; import SettingsStore, {SettingLevel} from "./settings/SettingsStore"; diff --git a/src/Registration.js b/src/Registration.js index 42e172ca0b..e76e7bc5bf 100644 --- a/src/Registration.js +++ b/src/Registration.js @@ -21,7 +21,7 @@ limitations under the License. */ import dis from './dispatcher'; -import sdk from './index'; +import * as sdk from './index'; import Modal from './Modal'; import { _t } from './languageHandler'; // import MatrixClientPeg from './MatrixClientPeg'; diff --git a/src/RoomInvite.js b/src/RoomInvite.js index 48baad5d9f..80979da372 100644 --- a/src/RoomInvite.js +++ b/src/RoomInvite.js @@ -21,7 +21,7 @@ import MultiInviter from './utils/MultiInviter'; import Modal from './Modal'; import { getAddressType } from './UserAddress'; import createRoom from './createRoom'; -import sdk from './'; +import * as sdk from './'; import dis from './dispatcher'; import DMRoomMap from './utils/DMRoomMap'; import { _t } from './languageHandler'; diff --git a/src/SlashCommands.js b/src/SlashCommands.js index a9c015fdaf..b9b7866643 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -20,7 +20,7 @@ limitations under the License. import React from 'react'; import MatrixClientPeg from './MatrixClientPeg'; import dis from './dispatcher'; -import sdk from './index'; +import * as sdk from './index'; import {_t, _td} from './languageHandler'; import Modal from './Modal'; import MultiInviter from './utils/MultiInviter'; diff --git a/src/Terms.js b/src/Terms.js index 14a7ccb65e..f6a4850446 100644 --- a/src/Terms.js +++ b/src/Terms.js @@ -17,7 +17,7 @@ limitations under the License. import classNames from 'classnames'; import MatrixClientPeg from './MatrixClientPeg'; -import sdk from './'; +import * as sdk from './'; import Modal from './Modal'; export class TermsNotSignedError extends Error {} diff --git a/src/actions/RoomListActions.js b/src/actions/RoomListActions.js index e5911c4e32..854fa1b367 100644 --- a/src/actions/RoomListActions.js +++ b/src/actions/RoomListActions.js @@ -20,7 +20,7 @@ import RoomListStore from '../stores/RoomListStore'; import Modal from '../Modal'; import * as Rooms from '../Rooms'; import { _t } from '../languageHandler'; -import sdk from '../index'; +import * as sdk from '../index'; const RoomListActions = {}; diff --git a/src/async-components/views/dialogs/ExportE2eKeysDialog.js b/src/async-components/views/dialogs/ExportE2eKeysDialog.js index ba2e985889..481075d0fa 100644 --- a/src/async-components/views/dialogs/ExportE2eKeysDialog.js +++ b/src/async-components/views/dialogs/ExportE2eKeysDialog.js @@ -22,7 +22,7 @@ import { _t } from '../../../languageHandler'; import { MatrixClient } from 'matrix-js-sdk'; import * as MegolmExportEncryption from '../../../utils/MegolmExportEncryption'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; const PHASE_EDIT = 1; const PHASE_EXPORTING = 2; diff --git a/src/async-components/views/dialogs/ImportE2eKeysDialog.js b/src/async-components/views/dialogs/ImportE2eKeysDialog.js index de9e819f5a..591c84f5d3 100644 --- a/src/async-components/views/dialogs/ImportE2eKeysDialog.js +++ b/src/async-components/views/dialogs/ImportE2eKeysDialog.js @@ -20,7 +20,7 @@ import createReactClass from 'create-react-class'; import { MatrixClient } from 'matrix-js-sdk'; import * as MegolmExportEncryption from '../../../utils/MegolmExportEncryption'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; function readFileAsArrayBuffer(file) { diff --git a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js index 3fac00c1b3..3b34c2f7a0 100644 --- a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js +++ b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import FileSaver from 'file-saver'; -import sdk from '../../../../index'; +import * as sdk from '../../../../index'; import MatrixClientPeg from '../../../../MatrixClientPeg'; import { scorePassword } from '../../../../utils/PasswordScorer'; import { _t } from '../../../../languageHandler'; diff --git a/src/async-components/views/dialogs/keybackup/IgnoreRecoveryReminderDialog.js b/src/async-components/views/dialogs/keybackup/IgnoreRecoveryReminderDialog.js index a9df3cca6e..b79911c66e 100644 --- a/src/async-components/views/dialogs/keybackup/IgnoreRecoveryReminderDialog.js +++ b/src/async-components/views/dialogs/keybackup/IgnoreRecoveryReminderDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import PropTypes from "prop-types"; -import sdk from "../../../../index"; +import * as sdk from "../../../../index"; import { _t } from "../../../../languageHandler"; export default class IgnoreRecoveryReminderDialog extends React.PureComponent { diff --git a/src/async-components/views/dialogs/keybackup/NewRecoveryMethodDialog.js b/src/async-components/views/dialogs/keybackup/NewRecoveryMethodDialog.js index 28281af771..5382aba23b 100644 --- a/src/async-components/views/dialogs/keybackup/NewRecoveryMethodDialog.js +++ b/src/async-components/views/dialogs/keybackup/NewRecoveryMethodDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import PropTypes from "prop-types"; -import sdk from "../../../../index"; +import * as sdk from "../../../../index"; import MatrixClientPeg from '../../../../MatrixClientPeg'; import dis from "../../../../dispatcher"; import { _t } from "../../../../languageHandler"; diff --git a/src/async-components/views/dialogs/keybackup/RecoveryMethodRemovedDialog.js b/src/async-components/views/dialogs/keybackup/RecoveryMethodRemovedDialog.js index 1975fbe6d6..2ca595fdc9 100644 --- a/src/async-components/views/dialogs/keybackup/RecoveryMethodRemovedDialog.js +++ b/src/async-components/views/dialogs/keybackup/RecoveryMethodRemovedDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import PropTypes from "prop-types"; -import sdk from "../../../../index"; +import * as sdk from "../../../../index"; import dis from "../../../../dispatcher"; import { _t } from "../../../../languageHandler"; import Modal from "../../../../Modal"; diff --git a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js index 78ff2a1698..beb7a22157 100644 --- a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js @@ -16,7 +16,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../../index'; +import * as sdk from '../../../../index'; import MatrixClientPeg from '../../../../MatrixClientPeg'; import { scorePassword } from '../../../../utils/PasswordScorer'; import FileSaver from 'file-saver'; diff --git a/src/autocomplete/CommunityProvider.js b/src/autocomplete/CommunityProvider.js index 0acfd426fb..dce1d279ff 100644 --- a/src/autocomplete/CommunityProvider.js +++ b/src/autocomplete/CommunityProvider.js @@ -21,7 +21,7 @@ import AutocompleteProvider from './AutocompleteProvider'; import MatrixClientPeg from '../MatrixClientPeg'; import QueryMatcher from './QueryMatcher'; import {PillCompletion} from './Components'; -import sdk from '../index'; +import * as sdk from '../index'; import _sortBy from 'lodash/sortBy'; import {makeGroupPermalink} from "../utils/permalinks/Permalinks"; import type {Completion, SelectionRange} from "./Autocompleter"; diff --git a/src/autocomplete/NotifProvider.js b/src/autocomplete/NotifProvider.js index 95cfb34616..1fb9da95c9 100644 --- a/src/autocomplete/NotifProvider.js +++ b/src/autocomplete/NotifProvider.js @@ -19,7 +19,7 @@ import AutocompleteProvider from './AutocompleteProvider'; import { _t } from '../languageHandler'; import MatrixClientPeg from '../MatrixClientPeg'; import {PillCompletion} from './Components'; -import sdk from '../index'; +import * as sdk from '../index'; import type {Completion, SelectionRange} from "./Autocompleter"; const AT_ROOM_REGEX = /@\S*/g; diff --git a/src/autocomplete/RoomProvider.js b/src/autocomplete/RoomProvider.js index b67abc388e..91b4543432 100644 --- a/src/autocomplete/RoomProvider.js +++ b/src/autocomplete/RoomProvider.js @@ -24,7 +24,7 @@ import MatrixClientPeg from '../MatrixClientPeg'; import QueryMatcher from './QueryMatcher'; import {PillCompletion} from './Components'; import {getDisplayAliasForRoom} from '../Rooms'; -import sdk from '../index'; +import * as sdk from '../index'; import _sortBy from 'lodash/sortBy'; import {makeRoomPermalink} from "../utils/permalinks/Permalinks"; import type {Completion, SelectionRange} from "./Autocompleter"; diff --git a/src/autocomplete/UserProvider.js b/src/autocomplete/UserProvider.js index ac159c8213..3385e13b72 100644 --- a/src/autocomplete/UserProvider.js +++ b/src/autocomplete/UserProvider.js @@ -22,7 +22,7 @@ import React from 'react'; import { _t } from '../languageHandler'; import AutocompleteProvider from './AutocompleteProvider'; import {PillCompletion} from './Components'; -import sdk from '../index'; +import * as sdk from '../index'; import QueryMatcher from './QueryMatcher'; import _sortBy from 'lodash/sortBy'; import MatrixClientPeg from '../MatrixClientPeg'; diff --git a/src/components/structures/ContextMenu.js b/src/components/structures/ContextMenu.js index e861e3d45f..bc6fd68686 100644 --- a/src/components/structures/ContextMenu.js +++ b/src/components/structures/ContextMenu.js @@ -21,7 +21,7 @@ import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import {Key} from "../../Keyboard"; -import sdk from "../../index"; +import * as sdk from "../../index"; import AccessibleButton from "../views/elements/AccessibleButton"; // Shamelessly ripped off Modal.js. There's probably a better way diff --git a/src/components/structures/CustomRoomTagPanel.js b/src/components/structures/CustomRoomTagPanel.js index ee69d800ed..f378e0f25e 100644 --- a/src/components/structures/CustomRoomTagPanel.js +++ b/src/components/structures/CustomRoomTagPanel.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import CustomRoomTagStore from '../../stores/CustomRoomTagStore'; import AutoHideScrollbar from './AutoHideScrollbar'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; import classNames from 'classnames'; import * as FormattingUtils from '../../utils/FormattingUtils'; diff --git a/src/components/structures/EmbeddedPage.js b/src/components/structures/EmbeddedPage.js index ecc01a443d..8cc8a9424e 100644 --- a/src/components/structures/EmbeddedPage.js +++ b/src/components/structures/EmbeddedPage.js @@ -23,7 +23,7 @@ import PropTypes from 'prop-types'; import request from 'browser-request'; import { _t } from '../../languageHandler'; import sanitizeHtml from 'sanitize-html'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; import MatrixClientPeg from '../../MatrixClientPeg'; import { MatrixClient } from 'matrix-js-sdk'; diff --git a/src/components/structures/FilePanel.js b/src/components/structures/FilePanel.js index f5a5912dd5..ef60f71ec9 100644 --- a/src/components/structures/FilePanel.js +++ b/src/components/structures/FilePanel.js @@ -19,7 +19,7 @@ import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import Matrix from 'matrix-js-sdk'; -import sdk from '../../index'; +import * as sdk from '../../index'; import MatrixClientPeg from '../../MatrixClientPeg'; import { _t } from '../../languageHandler'; diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 9df4630136..07a9fbc521 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -20,7 +20,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import MatrixClientPeg from '../../MatrixClientPeg'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; import { getHostingLink } from '../../utils/HostingLink'; import { sanitizedHtmlNode } from '../../HtmlUtils'; diff --git a/src/components/structures/InteractiveAuth.js b/src/components/structures/InteractiveAuth.js index 1981310a2f..e7194e9fa4 100644 --- a/src/components/structures/InteractiveAuth.js +++ b/src/components/structures/InteractiveAuth.js @@ -24,7 +24,7 @@ import PropTypes from 'prop-types'; import {getEntryComponentForLoginType} from '../views/auth/InteractiveAuthEntryComponents'; -import sdk from '../../index'; +import * as sdk from '../../index'; export default createReactClass({ displayName: 'InteractiveAuth', diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js index a0ad2b5c81..080344abc6 100644 --- a/src/components/structures/LeftPanel.js +++ b/src/components/structures/LeftPanel.js @@ -21,9 +21,9 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import { MatrixClient } from 'matrix-js-sdk'; import { Key } from '../../Keyboard'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; -import VectorConferenceHandler from '../../VectorConferenceHandler'; +import * as VectorConferenceHandler from '../../VectorConferenceHandler'; import TagPanelButtons from './TagPanelButtons'; import SettingsStore from '../../settings/SettingsStore'; import {_t} from "../../languageHandler"; diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index df2eebd7c9..85b794f67f 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -26,7 +26,7 @@ import { Key, isOnlyCtrlOrCmdKeyEvent } from '../../Keyboard'; import PageTypes from '../../PageTypes'; import CallMediaHandler from '../../CallMediaHandler'; import { fixupColorFonts } from '../../utils/FontManager'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; import sessionStore from '../../stores/SessionStore'; import MatrixClientPeg from '../../MatrixClientPeg'; diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 8105805ab0..1469324aaf 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -38,7 +38,7 @@ import Notifier from '../../Notifier'; import Modal from "../../Modal"; import Tinter from "../../Tinter"; -import sdk from '../../index'; +import * as sdk from '../../index'; import { showStartChatInviteDialog, showRoomInviteDialog } from '../../RoomInvite'; import * as Rooms from '../../Rooms'; import linkifyMatrix from "../../linkify-matrix"; diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index f7d22bc17a..01644d8aff 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -22,7 +22,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import shouldHideEvent from '../../shouldHideEvent'; import {wantsDateSeparator} from '../../DateUtils'; -import sdk from '../../index'; +import * as sdk from '../../index'; import MatrixClientPeg from '../../MatrixClientPeg'; import SettingsStore from '../../settings/SettingsStore'; diff --git a/src/components/structures/MyGroups.js b/src/components/structures/MyGroups.js index 63ae14ba09..3c01c3d6a3 100644 --- a/src/components/structures/MyGroups.js +++ b/src/components/structures/MyGroups.js @@ -19,7 +19,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { MatrixClient } from 'matrix-js-sdk'; -import sdk from '../../index'; +import * as sdk from '../../index'; import { _t } from '../../languageHandler'; import dis from '../../dispatcher'; import AccessibleButton from '../views/elements/AccessibleButton'; diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 1745c9d7dc..bb62699ecf 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -21,7 +21,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; import { MatrixClient } from 'matrix-js-sdk'; import RateLimitedFunc from '../../ratelimitedfunc'; diff --git a/src/components/structures/RoomStatusBar.js b/src/components/structures/RoomStatusBar.js index b0aa4cb59b..a10faa199a 100644 --- a/src/components/structures/RoomStatusBar.js +++ b/src/components/structures/RoomStatusBar.js @@ -20,7 +20,7 @@ import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import Matrix from 'matrix-js-sdk'; import { _t, _td } from '../../languageHandler'; -import sdk from '../../index'; +import * as sdk from '../../index'; import MatrixClientPeg from '../../MatrixClientPeg'; import Resend from '../../Resend'; import * as cryptodevices from '../../cryptodevices'; diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 2fbd19c428..e16fee64a5 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -19,9 +19,9 @@ limitations under the License. import React, {createRef} from 'react'; import classNames from 'classnames'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; -import Unread from '../../Unread'; +import * as Unread from '../../Unread'; import * as RoomNotifs from '../../RoomNotifs'; import * as FormattingUtils from '../../utils/FormattingUtils'; import IndicatorScrollbar from './IndicatorScrollbar'; diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 2f8d274866..fbbc8b56ba 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -35,12 +35,12 @@ import {RoomPermalinkCreator} from '../../utils/permalinks/Permalinks'; import MatrixClientPeg from '../../MatrixClientPeg'; import ContentMessages from '../../ContentMessages'; import Modal from '../../Modal'; -import sdk from '../../index'; +import * as sdk from '../../index'; import CallHandler from '../../CallHandler'; import dis from '../../dispatcher'; import Tinter from '../../Tinter'; import rate_limited_func from '../../ratelimitedfunc'; -import ObjectUtils from '../../ObjectUtils'; +import * as ObjectUtils from '../../ObjectUtils'; import * as Rooms from '../../Rooms'; import eventSearch from '../../Searching'; diff --git a/src/components/structures/TabbedView.js b/src/components/structures/TabbedView.js index 01c68fad62..ae5f9e3ee1 100644 --- a/src/components/structures/TabbedView.js +++ b/src/components/structures/TabbedView.js @@ -19,7 +19,7 @@ limitations under the License. import * as React from "react"; import {_t} from '../../languageHandler'; import PropTypes from "prop-types"; -import sdk from "../../index"; +import * as sdk from "../../index"; /** * Represents a tab for the TabbedView. diff --git a/src/components/structures/TagPanel.js b/src/components/structures/TagPanel.js index a758092dc8..0724027e37 100644 --- a/src/components/structures/TagPanel.js +++ b/src/components/structures/TagPanel.js @@ -22,7 +22,7 @@ import TagOrderStore from '../../stores/TagOrderStore'; import GroupActions from '../../actions/GroupActions'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; import { _t } from '../../languageHandler'; diff --git a/src/components/structures/TagPanelButtons.js b/src/components/structures/TagPanelButtons.js index 7255e12307..93a596baa3 100644 --- a/src/components/structures/TagPanelButtons.js +++ b/src/components/structures/TagPanelButtons.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; -import sdk from '../../index'; +import * as sdk from '../../index'; import dis from '../../dispatcher'; import Modal from '../../Modal'; import { _t } from '../../languageHandler'; diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 41283b5308..d8c2b96424 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -31,7 +31,7 @@ const sdk = require('../../index'); import { _t } from '../../languageHandler'; const MatrixClientPeg = require("../../MatrixClientPeg"); const dis = require("../../dispatcher"); -const ObjectUtils = require('../../ObjectUtils'); +import * as ObjectUtils from "../../ObjectUtils"; const Modal = require("../../Modal"); const UserActivity = require("../../UserActivity"); import { KeyCode } from '../../Keyboard'; diff --git a/src/components/structures/TopLeftMenuButton.js b/src/components/structures/TopLeftMenuButton.js index e7928ab4d7..0d7af81a07 100644 --- a/src/components/structures/TopLeftMenuButton.js +++ b/src/components/structures/TopLeftMenuButton.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import {TopLeftMenu} from '../views/context_menus/TopLeftMenu'; import BaseAvatar from '../views/avatars/BaseAvatar'; import MatrixClientPeg from '../../MatrixClientPeg'; -import Avatar from '../../Avatar'; +import * as Avatar from '../../Avatar'; import { _t } from '../../languageHandler'; import dis from "../../dispatcher"; import {ContextMenu, ContextMenuButton} from "./ContextMenu"; diff --git a/src/components/structures/UserView.js b/src/components/structures/UserView.js index 26d0ff5044..57235093f7 100644 --- a/src/components/structures/UserView.js +++ b/src/components/structures/UserView.js @@ -19,7 +19,7 @@ import React from "react"; import PropTypes from "prop-types"; import Matrix from "matrix-js-sdk"; import MatrixClientPeg from "../../MatrixClientPeg"; -import sdk from "../../index"; +import * as sdk from "../../index"; import Modal from '../../Modal'; import { _t } from '../../languageHandler'; diff --git a/src/components/structures/ViewSource.js b/src/components/structures/ViewSource.js index ef4ede517a..391cbf6eef 100644 --- a/src/components/structures/ViewSource.js +++ b/src/components/structures/ViewSource.js @@ -20,7 +20,7 @@ import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import SyntaxHighlight from '../views/elements/SyntaxHighlight'; import {_t} from "../../languageHandler"; -import sdk from "../../index"; +import * as sdk from "../../index"; module.exports = createReactClass({ diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index ada7d4449b..01453f1322 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -20,7 +20,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from "../../../Modal"; import SdkConfig from "../../../SdkConfig"; import PasswordReset from "../../../PasswordReset"; diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index ade417d156..bdc95d4b94 100644 --- a/src/components/structures/auth/Login.js +++ b/src/components/structures/auth/Login.js @@ -20,7 +20,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import {_t, _td} from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Login from '../../../Login'; import SdkConfig from '../../../SdkConfig'; import { messageForResourceLimitError } from '../../../utils/ErrorUtils'; diff --git a/src/components/structures/auth/PostRegistration.js b/src/components/structures/auth/PostRegistration.js index a77b4d0d56..0395cb8d35 100644 --- a/src/components/structures/auth/PostRegistration.js +++ b/src/components/structures/auth/PostRegistration.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import AuthPage from "../../views/auth/AuthPage"; diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index 69f34f764a..20769be4cd 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -21,7 +21,7 @@ import Matrix from 'matrix-js-sdk'; import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t, _td } from '../../../languageHandler'; import SdkConfig from '../../../SdkConfig'; import { messageForResourceLimitError } from '../../../utils/ErrorUtils'; diff --git a/src/components/structures/auth/SoftLogout.js b/src/components/structures/auth/SoftLogout.js index da19a852f6..bdc34117d0 100644 --- a/src/components/structures/auth/SoftLogout.js +++ b/src/components/structures/auth/SoftLogout.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import * as Lifecycle from '../../../Lifecycle'; import Modal from '../../../Modal'; diff --git a/src/components/views/auth/AuthHeader.js b/src/components/views/auth/AuthHeader.js index 193f347857..abf9e8895e 100644 --- a/src/components/views/auth/AuthHeader.js +++ b/src/components/views/auth/AuthHeader.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; module.exports = createReactClass({ displayName: 'AuthHeader', diff --git a/src/components/views/auth/AuthPage.js b/src/components/views/auth/AuthPage.js index bfac6514e2..82f7270121 100644 --- a/src/components/views/auth/AuthPage.js +++ b/src/components/views/auth/AuthPage.js @@ -17,7 +17,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import {replaceableComponent} from "../../../utils/replaceableComponent"; @replaceableComponent("views.auth.AuthPage") diff --git a/src/components/views/auth/CountryDropdown.js b/src/components/views/auth/CountryDropdown.js index d8aa88c798..c55d2419ff 100644 --- a/src/components/views/auth/CountryDropdown.js +++ b/src/components/views/auth/CountryDropdown.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { COUNTRIES } from '../../../phonenumber'; import SdkConfig from "../../../SdkConfig"; diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.js b/src/components/views/auth/InteractiveAuthEntryComponents.js index dd661291f3..869e81c1f7 100644 --- a/src/components/views/auth/InteractiveAuthEntryComponents.js +++ b/src/components/views/auth/InteractiveAuthEntryComponents.js @@ -22,7 +22,7 @@ import PropTypes from 'prop-types'; import url from 'url'; import classnames from 'classnames'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/auth/LanguageSelector.js b/src/components/views/auth/LanguageSelector.js index 32862478f4..99578d4504 100644 --- a/src/components/views/auth/LanguageSelector.js +++ b/src/components/views/auth/LanguageSelector.js @@ -18,7 +18,7 @@ import SdkConfig from "../../../SdkConfig"; import {getCurrentLanguage} from "../../../languageHandler"; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; import PlatformPeg from "../../../PlatformPeg"; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import React from 'react'; function onChange(newLang) { diff --git a/src/components/views/auth/ModularServerConfig.js b/src/components/views/auth/ModularServerConfig.js index 684e8d5912..32418d3462 100644 --- a/src/components/views/auth/ModularServerConfig.js +++ b/src/components/views/auth/ModularServerConfig.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import SdkConfig from "../../../SdkConfig"; diff --git a/src/components/views/auth/PasswordLogin.js b/src/components/views/auth/PasswordLogin.js index 63e77a938d..c836b96a89 100644 --- a/src/components/views/auth/PasswordLogin.js +++ b/src/components/views/auth/PasswordLogin.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import SdkConfig from '../../../SdkConfig'; import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; diff --git a/src/components/views/auth/RegistrationForm.js b/src/components/views/auth/RegistrationForm.js index 03fb74462c..d85ad6b3b2 100644 --- a/src/components/views/auth/RegistrationForm.js +++ b/src/components/views/auth/RegistrationForm.js @@ -20,8 +20,8 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; -import Email from '../../../email'; +import * as sdk from '../../../index'; +import * as Email from '../../../email'; import { looksValid as phoneNumberLooksValid } from '../../../phonenumber'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/auth/ServerConfig.js b/src/components/views/auth/ServerConfig.js index e5523b1e36..a86e27b6c2 100644 --- a/src/components/views/auth/ServerConfig.js +++ b/src/components/views/auth/ServerConfig.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import Modal from '../../../Modal'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils"; diff --git a/src/components/views/auth/ServerTypeSelector.js b/src/components/views/auth/ServerTypeSelector.js index ebc2ea6d37..341f81c546 100644 --- a/src/components/views/auth/ServerTypeSelector.js +++ b/src/components/views/auth/ServerTypeSelector.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import classnames from 'classnames'; import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import {makeType} from "../../../utils/TypeUtils"; diff --git a/src/components/views/auth/SignInToText.js b/src/components/views/auth/SignInToText.js index a7acdc6705..7564096b7d 100644 --- a/src/components/views/auth/SignInToText.js +++ b/src/components/views/auth/SignInToText.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import {_t} from "../../../languageHandler"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import PropTypes from "prop-types"; import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; diff --git a/src/components/views/auth/Welcome.js b/src/components/views/auth/Welcome.js index a110631033..58f117ea36 100644 --- a/src/components/views/auth/Welcome.js +++ b/src/components/views/auth/Welcome.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import SdkConfig from '../../../SdkConfig'; import AuthPage from "./AuthPage"; diff --git a/src/components/views/avatars/BaseAvatar.js b/src/components/views/avatars/BaseAvatar.js index 82db78615e..8218ffdfc6 100644 --- a/src/components/views/avatars/BaseAvatar.js +++ b/src/components/views/avatars/BaseAvatar.js @@ -20,7 +20,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import { MatrixClient } from 'matrix-js-sdk'; -import AvatarLogic from '../../../Avatar'; +import * as AvatarLogic from '../../../Avatar'; import SettingsStore from "../../../settings/SettingsStore"; import AccessibleButton from '../elements/AccessibleButton'; diff --git a/src/components/views/avatars/GroupAvatar.js b/src/components/views/avatars/GroupAvatar.js index e8ef2a5279..27122052dd 100644 --- a/src/components/views/avatars/GroupAvatar.js +++ b/src/components/views/avatars/GroupAvatar.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; export default createReactClass({ diff --git a/src/components/views/avatars/MemberAvatar.js b/src/components/views/avatars/MemberAvatar.js index 383bab5e79..cb9ef70168 100644 --- a/src/components/views/avatars/MemberAvatar.js +++ b/src/components/views/avatars/MemberAvatar.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -const Avatar = require('../../../Avatar'); +import * as Avatar from '../../../Avatar'; const sdk = require("../../../index"); const dispatcher = require("../../../dispatcher"); diff --git a/src/components/views/avatars/RoomAvatar.js b/src/components/views/avatars/RoomAvatar.js index 6f8f236afc..d1e2ed25bb 100644 --- a/src/components/views/avatars/RoomAvatar.js +++ b/src/components/views/avatars/RoomAvatar.js @@ -19,8 +19,8 @@ import createReactClass from 'create-react-class'; import {ContentRepo} from "matrix-js-sdk"; import MatrixClientPeg from "../../../MatrixClientPeg"; import Modal from '../../../Modal'; -import sdk from "../../../index"; -import Avatar from '../../../Avatar'; +import * as sdk from "../../../index"; +import * as Avatar from '../../../Avatar'; module.exports = createReactClass({ displayName: 'RoomAvatar', diff --git a/src/components/views/context_menus/GroupInviteTileContextMenu.js b/src/components/views/context_menus/GroupInviteTileContextMenu.js index 3feffbc0d9..6d0f921ed0 100644 --- a/src/components/views/context_menus/GroupInviteTileContextMenu.js +++ b/src/components/views/context_menus/GroupInviteTileContextMenu.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import {Group} from 'matrix-js-sdk'; diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index efbfc4322f..876e3b10ac 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -24,7 +24,7 @@ import {EventStatus} from 'matrix-js-sdk'; import MatrixClientPeg from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import Resend from '../../../Resend'; diff --git a/src/components/views/context_menus/RoomTileContextMenu.js b/src/components/views/context_menus/RoomTileContextMenu.js index f5e68bd20b..d9497d729e 100644 --- a/src/components/views/context_menus/RoomTileContextMenu.js +++ b/src/components/views/context_menus/RoomTileContextMenu.js @@ -21,7 +21,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import classNames from 'classnames'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t, _td } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; diff --git a/src/components/views/context_menus/StatusMessageContextMenu.js b/src/components/views/context_menus/StatusMessageContextMenu.js index 441220c95e..e9dd42f123 100644 --- a/src/components/views/context_menus/StatusMessageContextMenu.js +++ b/src/components/views/context_menus/StatusMessageContextMenu.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import AccessibleButton from '../elements/AccessibleButton'; export default class StatusMessageContextMenu extends React.Component { diff --git a/src/components/views/context_menus/TagTileContextMenu.js b/src/components/views/context_menus/TagTileContextMenu.js index 1af0c9ae66..2be0487ced 100644 --- a/src/components/views/context_menus/TagTileContextMenu.js +++ b/src/components/views/context_menus/TagTileContextMenu.js @@ -21,7 +21,7 @@ import { MatrixClient } from 'matrix-js-sdk'; import { _t } from '../../../languageHandler'; import dis from '../../../dispatcher'; import TagOrderActions from '../../../actions/TagOrderActions'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import {MenuItem} from "../../structures/ContextMenu"; export default class TagTileContextMenu extends React.Component { diff --git a/src/components/views/dialogs/AddressPickerDialog.js b/src/components/views/dialogs/AddressPickerDialog.js index 2be505a798..a1cdb5d5bb 100644 --- a/src/components/views/dialogs/AddressPickerDialog.js +++ b/src/components/views/dialogs/AddressPickerDialog.js @@ -22,7 +22,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import { _t, _td } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import { addressTypes, getAddressType } from '../../../UserAddress.js'; diff --git a/src/components/views/dialogs/AskInviteAnywayDialog.js b/src/components/views/dialogs/AskInviteAnywayDialog.js index 3d10752ff8..7fa6069478 100644 --- a/src/components/views/dialogs/AskInviteAnywayDialog.js +++ b/src/components/views/dialogs/AskInviteAnywayDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import {SettingLevel} from "../../../settings/SettingsStore"; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/dialogs/BugReportDialog.js b/src/components/views/dialogs/BugReportDialog.js index a3c4ad96ee..9289947e61 100644 --- a/src/components/views/dialogs/BugReportDialog.js +++ b/src/components/views/dialogs/BugReportDialog.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import SdkConfig from '../../../SdkConfig'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/ChangelogDialog.js b/src/components/views/dialogs/ChangelogDialog.js index 91f1af64e3..e58f56a639 100644 --- a/src/components/views/dialogs/ChangelogDialog.js +++ b/src/components/views/dialogs/ChangelogDialog.js @@ -17,7 +17,7 @@ Copyright 2019 Michael Telatynski <7t3chguy@gmail.com> import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import request from 'browser-request'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/ConfirmAndWaitRedactDialog.js b/src/components/views/dialogs/ConfirmAndWaitRedactDialog.js index db00f445a8..0622dd7dfb 100644 --- a/src/components/views/dialogs/ConfirmAndWaitRedactDialog.js +++ b/src/components/views/dialogs/ConfirmAndWaitRedactDialog.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; /* diff --git a/src/components/views/dialogs/ConfirmRedactDialog.js b/src/components/views/dialogs/ConfirmRedactDialog.js index c606706ed2..71139155ec 100644 --- a/src/components/views/dialogs/ConfirmRedactDialog.js +++ b/src/components/views/dialogs/ConfirmRedactDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; /* diff --git a/src/components/views/dialogs/ConfirmUserActionDialog.js b/src/components/views/dialogs/ConfirmUserActionDialog.js index 4d33b2b500..14910fbf6d 100644 --- a/src/components/views/dialogs/ConfirmUserActionDialog.js +++ b/src/components/views/dialogs/ConfirmUserActionDialog.js @@ -18,7 +18,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { MatrixClient } from 'matrix-js-sdk'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { GroupMemberType } from '../../../groups'; diff --git a/src/components/views/dialogs/ConfirmWipeDeviceDialog.js b/src/components/views/dialogs/ConfirmWipeDeviceDialog.js index b7ad5c2557..49b558976a 100644 --- a/src/components/views/dialogs/ConfirmWipeDeviceDialog.js +++ b/src/components/views/dialogs/ConfirmWipeDeviceDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; export default class ConfirmWipeDeviceDialog extends React.Component { static propTypes = { diff --git a/src/components/views/dialogs/CreateGroupDialog.js b/src/components/views/dialogs/CreateGroupDialog.js index 3430a12e71..b88639ba5a 100644 --- a/src/components/views/dialogs/CreateGroupDialog.js +++ b/src/components/views/dialogs/CreateGroupDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; diff --git a/src/components/views/dialogs/CreateRoomDialog.js b/src/components/views/dialogs/CreateRoomDialog.js index 6a73d22708..cdc63b7f88 100644 --- a/src/components/views/dialogs/CreateRoomDialog.js +++ b/src/components/views/dialogs/CreateRoomDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import SdkConfig from '../../../SdkConfig'; import withValidation from '../elements/Validation'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/CryptoStoreTooNewDialog.js b/src/components/views/dialogs/CryptoStoreTooNewDialog.js index 0146420f46..11e202b0cc 100644 --- a/src/components/views/dialogs/CryptoStoreTooNewDialog.js +++ b/src/components/views/dialogs/CryptoStoreTooNewDialog.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; diff --git a/src/components/views/dialogs/DeactivateAccountDialog.js b/src/components/views/dialogs/DeactivateAccountDialog.js index 703ecaf092..bbf5dbe943 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.js +++ b/src/components/views/dialogs/DeactivateAccountDialog.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Analytics from '../../../Analytics'; import MatrixClientPeg from '../../../MatrixClientPeg'; import * as Lifecycle from '../../../Lifecycle'; diff --git a/src/components/views/dialogs/DeviceVerifyDialog.js b/src/components/views/dialogs/DeviceVerifyDialog.js index 0e191cc192..708dfb1dd6 100644 --- a/src/components/views/dialogs/DeviceVerifyDialog.js +++ b/src/components/views/dialogs/DeviceVerifyDialog.js @@ -20,7 +20,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import * as FormattingUtils from '../../../utils/FormattingUtils'; import { _t } from '../../../languageHandler'; import {verificationMethods} from 'matrix-js-sdk/lib/crypto'; diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index 9327e1e54e..dfb15f0e0c 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import SyntaxHighlight from '../elements/SyntaxHighlight'; import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; diff --git a/src/components/views/dialogs/ErrorDialog.js b/src/components/views/dialogs/ErrorDialog.js index f6db0a14a5..15c87990d0 100644 --- a/src/components/views/dialogs/ErrorDialog.js +++ b/src/components/views/dialogs/ErrorDialog.js @@ -28,7 +28,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; export default createReactClass({ diff --git a/src/components/views/dialogs/IncomingSasDialog.js b/src/components/views/dialogs/IncomingSasDialog.js index 0720fedddc..d0a184f543 100644 --- a/src/components/views/dialogs/IncomingSasDialog.js +++ b/src/components/views/dialogs/IncomingSasDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; const PHASE_START = 0; diff --git a/src/components/views/dialogs/InfoDialog.js b/src/components/views/dialogs/InfoDialog.js index c54da480e6..8a8f51c25a 100644 --- a/src/components/views/dialogs/InfoDialog.js +++ b/src/components/views/dialogs/InfoDialog.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import classNames from "classnames"; diff --git a/src/components/views/dialogs/IntegrationsDisabledDialog.js b/src/components/views/dialogs/IntegrationsDisabledDialog.js index 3ab1123f8b..1ca638f0ab 100644 --- a/src/components/views/dialogs/IntegrationsDisabledDialog.js +++ b/src/components/views/dialogs/IntegrationsDisabledDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import dis from '../../../dispatcher'; export default class IntegrationsDisabledDialog extends React.Component { diff --git a/src/components/views/dialogs/IntegrationsImpossibleDialog.js b/src/components/views/dialogs/IntegrationsImpossibleDialog.js index 9927f627f1..f12e4232be 100644 --- a/src/components/views/dialogs/IntegrationsImpossibleDialog.js +++ b/src/components/views/dialogs/IntegrationsImpossibleDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; export default class IntegrationsImpossibleDialog extends React.Component { static propTypes = { diff --git a/src/components/views/dialogs/InteractiveAuthDialog.js b/src/components/views/dialogs/InteractiveAuthDialog.js index 0b658bad81..ff9f55cb74 100644 --- a/src/components/views/dialogs/InteractiveAuthDialog.js +++ b/src/components/views/dialogs/InteractiveAuthDialog.js @@ -19,7 +19,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import AccessibleButton from '../elements/AccessibleButton'; diff --git a/src/components/views/dialogs/KeyShareDialog.js b/src/components/views/dialogs/KeyShareDialog.js index 01e3479bb1..f9407213da 100644 --- a/src/components/views/dialogs/KeyShareDialog.js +++ b/src/components/views/dialogs/KeyShareDialog.js @@ -18,7 +18,7 @@ import Modal from '../../../Modal'; import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t, _td } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/LogoutDialog.js b/src/components/views/dialogs/LogoutDialog.js index 47d4153494..67d6574084 100644 --- a/src/components/views/dialogs/LogoutDialog.js +++ b/src/components/views/dialogs/LogoutDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import Modal from '../../../Modal'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; diff --git a/src/components/views/dialogs/MessageEditHistoryDialog.js b/src/components/views/dialogs/MessageEditHistoryDialog.js index b5e4daa1c1..24c5d3b682 100644 --- a/src/components/views/dialogs/MessageEditHistoryDialog.js +++ b/src/components/views/dialogs/MessageEditHistoryDialog.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import MatrixClientPeg from "../../../MatrixClientPeg"; import { _t } from '../../../languageHandler'; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import {wantsDateSeparator} from '../../../DateUtils'; import SettingsStore from '../../../settings/SettingsStore'; diff --git a/src/components/views/dialogs/QuestionDialog.js b/src/components/views/dialogs/QuestionDialog.js index 4d2a699898..b165bf79e2 100644 --- a/src/components/views/dialogs/QuestionDialog.js +++ b/src/components/views/dialogs/QuestionDialog.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; export default createReactClass({ diff --git a/src/components/views/dialogs/ReportEventDialog.js b/src/components/views/dialogs/ReportEventDialog.js index 394e5ad47d..dd5afeb477 100644 --- a/src/components/views/dialogs/ReportEventDialog.js +++ b/src/components/views/dialogs/ReportEventDialog.js @@ -15,7 +15,7 @@ limitations under the License. */ import React, {PureComponent} from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import PropTypes from "prop-types"; import {MatrixEvent} from "matrix-js-sdk"; diff --git a/src/components/views/dialogs/RoomSettingsDialog.js b/src/components/views/dialogs/RoomSettingsDialog.js index 740dc4d2c2..06a3f1301b 100644 --- a/src/components/views/dialogs/RoomSettingsDialog.js +++ b/src/components/views/dialogs/RoomSettingsDialog.js @@ -24,7 +24,7 @@ import RolesRoomSettingsTab from "../settings/tabs/room/RolesRoomSettingsTab"; import GeneralRoomSettingsTab from "../settings/tabs/room/GeneralRoomSettingsTab"; import SecurityRoomSettingsTab from "../settings/tabs/room/SecurityRoomSettingsTab"; import NotificationSettingsTab from "../settings/tabs/room/NotificationSettingsTab"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import MatrixClientPeg from "../../../MatrixClientPeg"; import dis from "../../../dispatcher"; diff --git a/src/components/views/dialogs/RoomUpgradeDialog.js b/src/components/views/dialogs/RoomUpgradeDialog.js index 6900ac6fe8..d81958c5f0 100644 --- a/src/components/views/dialogs/RoomUpgradeDialog.js +++ b/src/components/views/dialogs/RoomUpgradeDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/RoomUpgradeWarningDialog.js b/src/components/views/dialogs/RoomUpgradeWarningDialog.js index 4c5a1abf7a..1ee1bec987 100644 --- a/src/components/views/dialogs/RoomUpgradeWarningDialog.js +++ b/src/components/views/dialogs/RoomUpgradeWarningDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import LabelledToggleSwitch from "../elements/LabelledToggleSwitch"; import MatrixClientPeg from "../../../MatrixClientPeg"; import Modal from "../../../Modal"; diff --git a/src/components/views/dialogs/SessionRestoreErrorDialog.js b/src/components/views/dialogs/SessionRestoreErrorDialog.js index b9f6e77222..935faf0cad 100644 --- a/src/components/views/dialogs/SessionRestoreErrorDialog.js +++ b/src/components/views/dialogs/SessionRestoreErrorDialog.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import SdkConfig from '../../../SdkConfig'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/SetEmailDialog.js b/src/components/views/dialogs/SetEmailDialog.js index b527abffc9..2e38d6a7c4 100644 --- a/src/components/views/dialogs/SetEmailDialog.js +++ b/src/components/views/dialogs/SetEmailDialog.js @@ -18,8 +18,8 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; -import Email from '../../../email'; +import * as sdk from '../../../index'; +import * as Email from '../../../email'; import AddThreepid from '../../../AddThreepid'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; diff --git a/src/components/views/dialogs/SetMxIdDialog.js b/src/components/views/dialogs/SetMxIdDialog.js index 0294c1c700..dffb98443d 100644 --- a/src/components/views/dialogs/SetMxIdDialog.js +++ b/src/components/views/dialogs/SetMxIdDialog.js @@ -18,7 +18,7 @@ limitations under the License. import React, {createRef} from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import classnames from 'classnames'; import { KeyCode } from '../../../Keyboard'; diff --git a/src/components/views/dialogs/SetPasswordDialog.js b/src/components/views/dialogs/SetPasswordDialog.js index 0fe65aaca3..c8752afa6c 100644 --- a/src/components/views/dialogs/SetPasswordDialog.js +++ b/src/components/views/dialogs/SetPasswordDialog.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; diff --git a/src/components/views/dialogs/ShareDialog.js b/src/components/views/dialogs/ShareDialog.js index f9e77101fc..842c7fc109 100644 --- a/src/components/views/dialogs/ShareDialog.js +++ b/src/components/views/dialogs/ShareDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import {Room, User, Group, RoomMember, MatrixEvent} from 'matrix-js-sdk'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import QRCode from 'qrcode-react'; import {RoomPermalinkCreator, makeGroupPermalink, makeUserPermalink} from "../../../utils/permalinks/Permalinks"; diff --git a/src/components/views/dialogs/SlashCommandHelpDialog.js b/src/components/views/dialogs/SlashCommandHelpDialog.js index fc8cb46342..9e48a92ed1 100644 --- a/src/components/views/dialogs/SlashCommandHelpDialog.js +++ b/src/components/views/dialogs/SlashCommandHelpDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import {_t} from "../../../languageHandler"; import {CommandCategories, CommandMap} from "../../../SlashCommands"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; export default ({onFinished}) => { const InfoDialog = sdk.getComponent('dialogs.InfoDialog'); diff --git a/src/components/views/dialogs/StorageEvictedDialog.js b/src/components/views/dialogs/StorageEvictedDialog.js index 22fa3ae3ab..a22f302807 100644 --- a/src/components/views/dialogs/StorageEvictedDialog.js +++ b/src/components/views/dialogs/StorageEvictedDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import SdkConfig from '../../../SdkConfig'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/TabbedIntegrationManagerDialog.js b/src/components/views/dialogs/TabbedIntegrationManagerDialog.js index e86a46fb36..9f5c9f6a11 100644 --- a/src/components/views/dialogs/TabbedIntegrationManagerDialog.js +++ b/src/components/views/dialogs/TabbedIntegrationManagerDialog.js @@ -18,10 +18,10 @@ import React from 'react'; import PropTypes from 'prop-types'; import {IntegrationManagers} from "../../../integrations/IntegrationManagers"; import {Room} from "matrix-js-sdk"; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import {dialogTermsInteractionCallback, TermsNotSignedError} from "../../../Terms"; import classNames from 'classnames'; -import ScalarMessaging from "../../../ScalarMessaging"; +import * as ScalarMessaging from "../../../ScalarMessaging"; export default class TabbedIntegrationManagerDialog extends React.Component { static propTypes = { diff --git a/src/components/views/dialogs/TermsDialog.js b/src/components/views/dialogs/TermsDialog.js index ea090ef080..2d1e62e01a 100644 --- a/src/components/views/dialogs/TermsDialog.js +++ b/src/components/views/dialogs/TermsDialog.js @@ -17,7 +17,7 @@ limitations under the License. import url from 'url'; import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t, pickBestLanguage } from '../../../languageHandler'; import Matrix from 'matrix-js-sdk'; diff --git a/src/components/views/dialogs/TextInputDialog.js b/src/components/views/dialogs/TextInputDialog.js index a5421acaf5..0ffc072cc0 100644 --- a/src/components/views/dialogs/TextInputDialog.js +++ b/src/components/views/dialogs/TextInputDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React, {createRef} from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; export default createReactClass({ displayName: 'TextInputDialog', diff --git a/src/components/views/dialogs/UnknownDeviceDialog.js b/src/components/views/dialogs/UnknownDeviceDialog.js index e7522e971d..23e84bbe78 100644 --- a/src/components/views/dialogs/UnknownDeviceDialog.js +++ b/src/components/views/dialogs/UnknownDeviceDialog.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/dialogs/UploadConfirmDialog.js b/src/components/views/dialogs/UploadConfirmDialog.js index 98c031e89b..28f2183eb0 100644 --- a/src/components/views/dialogs/UploadConfirmDialog.js +++ b/src/components/views/dialogs/UploadConfirmDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import filesize from "filesize"; diff --git a/src/components/views/dialogs/UploadFailureDialog.js b/src/components/views/dialogs/UploadFailureDialog.js index e264f1a3fb..4be1656f66 100644 --- a/src/components/views/dialogs/UploadFailureDialog.js +++ b/src/components/views/dialogs/UploadFailureDialog.js @@ -18,7 +18,7 @@ import filesize from 'filesize'; import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import ContentMessages from '../../../ContentMessages'; diff --git a/src/components/views/dialogs/UserSettingsDialog.js b/src/components/views/dialogs/UserSettingsDialog.js index d3ab2b8722..a3f586cdea 100644 --- a/src/components/views/dialogs/UserSettingsDialog.js +++ b/src/components/views/dialogs/UserSettingsDialog.js @@ -28,7 +28,7 @@ import PreferencesUserSettingsTab from "../settings/tabs/user/PreferencesUserSet import VoiceUserSettingsTab from "../settings/tabs/user/VoiceUserSettingsTab"; import HelpUserSettingsTab from "../settings/tabs/user/HelpUserSettingsTab"; import FlairUserSettingsTab from "../settings/tabs/user/FlairUserSettingsTab"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import SdkConfig from "../../../SdkConfig"; import MjolnirUserSettingsTab from "../settings/tabs/user/MjolnirUserSettingsTab"; diff --git a/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.js b/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.js index 62bd1d2521..162cb4736a 100644 --- a/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.js +++ b/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import LabelledToggleSwitch from "../elements/LabelledToggleSwitch"; import WidgetUtils from "../../../utils/WidgetUtils"; diff --git a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js index 45168c381e..99dd118438 100644 --- a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js +++ b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../../index'; +import * as sdk from '../../../../index'; import MatrixClientPeg from '../../../../MatrixClientPeg'; import Modal from '../../../../Modal'; diff --git a/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js b/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js index d116ce505f..64bf54ce8a 100644 --- a/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js +++ b/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from "prop-types"; -import sdk from '../../../../index'; +import * as sdk from '../../../../index'; import MatrixClientPeg from '../../../../MatrixClientPeg'; import { _t } from '../../../../languageHandler'; diff --git a/src/components/views/elements/AccessibleTooltipButton.js b/src/components/views/elements/AccessibleTooltipButton.js index c824ea4025..401683160a 100644 --- a/src/components/views/elements/AccessibleTooltipButton.js +++ b/src/components/views/elements/AccessibleTooltipButton.js @@ -19,7 +19,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import AccessibleButton from "./AccessibleButton"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; export default class AccessibleTooltipButton extends React.PureComponent { static propTypes = { diff --git a/src/components/views/elements/ActionButton.js b/src/components/views/elements/ActionButton.js index ea9a9bd876..d2277bd69a 100644 --- a/src/components/views/elements/ActionButton.js +++ b/src/components/views/elements/ActionButton.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import AccessibleButton from './AccessibleButton'; import dis from '../../../dispatcher'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Analytics from '../../../Analytics'; export default createReactClass({ diff --git a/src/components/views/elements/AddressSelector.js b/src/components/views/elements/AddressSelector.js index fad57890c4..febe0ff480 100644 --- a/src/components/views/elements/AddressSelector.js +++ b/src/components/views/elements/AddressSelector.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import classNames from 'classnames'; import { UserAddressType } from '../../../UserAddress'; diff --git a/src/components/views/elements/AddressTile.js b/src/components/views/elements/AddressTile.js index 6d6ac20a5d..5ea6ca110c 100644 --- a/src/components/views/elements/AddressTile.js +++ b/src/components/views/elements/AddressTile.js @@ -19,7 +19,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import classNames from 'classnames'; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import MatrixClientPeg from "../../../MatrixClientPeg"; import { _t } from '../../../languageHandler'; import { UserAddressType } from '../../../UserAddress.js'; diff --git a/src/components/views/elements/AppPermission.js b/src/components/views/elements/AppPermission.js index 8dc58643bd..e08e008259 100644 --- a/src/components/views/elements/AppPermission.js +++ b/src/components/views/elements/AppPermission.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import url from 'url'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import WidgetUtils from "../../../utils/WidgetUtils"; import MatrixClientPeg from "../../../MatrixClientPeg"; diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 9f75e5433b..05491cf4d8 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -25,7 +25,7 @@ import WidgetMessaging from '../../../WidgetMessaging'; import AccessibleButton from './AccessibleButton'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import AppPermission from './AppPermission'; import AppWarning from './AppWarning'; import MessageSpinner from './MessageSpinner'; diff --git a/src/components/views/elements/CreateRoomButton.js b/src/components/views/elements/CreateRoomButton.js index da937be3e1..1410bdabdb 100644 --- a/src/components/views/elements/CreateRoomButton.js +++ b/src/components/views/elements/CreateRoomButton.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/elements/DeviceVerifyButtons.js b/src/components/views/elements/DeviceVerifyButtons.js index 15678b7d7a..6867406a03 100644 --- a/src/components/views/elements/DeviceVerifyButtons.js +++ b/src/components/views/elements/DeviceVerifyButtons.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/elements/DirectorySearchBox.js b/src/components/views/elements/DirectorySearchBox.js index 78a7cb7eba..5fe2f6dbc8 100644 --- a/src/components/views/elements/DirectorySearchBox.js +++ b/src/components/views/elements/DirectorySearchBox.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; export default class DirectorySearchBox extends React.Component { diff --git a/src/components/views/elements/EditableTextContainer.js b/src/components/views/elements/EditableTextContainer.js index 5cba98470c..53b3a454d2 100644 --- a/src/components/views/elements/EditableTextContainer.js +++ b/src/components/views/elements/EditableTextContainer.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; /** * A component which wraps an EditableText, with a spinner while updates take diff --git a/src/components/views/elements/ErrorBoundary.js b/src/components/views/elements/ErrorBoundary.js index e36464c4ef..12708863e5 100644 --- a/src/components/views/elements/ErrorBoundary.js +++ b/src/components/views/elements/ErrorBoundary.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; import PlatformPeg from '../../../PlatformPeg'; diff --git a/src/components/views/elements/Field.js b/src/components/views/elements/Field.js index 0a737d963a..86f73b68e4 100644 --- a/src/components/views/elements/Field.js +++ b/src/components/views/elements/Field.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { debounce } from 'lodash'; // Invoke validation from user input (when typing, etc.) at most once every N ms. diff --git a/src/components/views/elements/GroupsButton.js b/src/components/views/elements/GroupsButton.js index 7b15e96424..dd1118aba0 100644 --- a/src/components/views/elements/GroupsButton.js +++ b/src/components/views/elements/GroupsButton.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/elements/LanguageDropdown.js b/src/components/views/elements/LanguageDropdown.js index 451c97d958..3ebde884bb 100644 --- a/src/components/views/elements/LanguageDropdown.js +++ b/src/components/views/elements/LanguageDropdown.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import * as languageHandler from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/elements/ManageIntegsButton.js b/src/components/views/elements/ManageIntegsButton.js index 3503d1713b..b631ddee73 100644 --- a/src/components/views/elements/ManageIntegsButton.js +++ b/src/components/views/elements/ManageIntegsButton.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import {IntegrationManagers} from "../../../integrations/IntegrationManagers"; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/elements/MemberEventListSummary.js b/src/components/views/elements/MemberEventListSummary.js index ef80efaa68..c47e095e01 100644 --- a/src/components/views/elements/MemberEventListSummary.js +++ b/src/components/views/elements/MemberEventListSummary.js @@ -21,7 +21,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import { _t } from '../../../languageHandler'; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import {MatrixEvent} from "matrix-js-sdk"; module.exports = createReactClass({ diff --git a/src/components/views/elements/PersistentApp.js b/src/components/views/elements/PersistentApp.js index 19e4be6083..e0155d846b 100644 --- a/src/components/views/elements/PersistentApp.js +++ b/src/components/views/elements/PersistentApp.js @@ -19,7 +19,7 @@ import createReactClass from 'create-react-class'; import RoomViewStore from '../../../stores/RoomViewStore'; import ActiveWidgetStore from '../../../stores/ActiveWidgetStore'; import WidgetUtils from '../../../utils/WidgetUtils'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; module.exports = createReactClass({ diff --git a/src/components/views/elements/Pill.js b/src/components/views/elements/Pill.js index 12830488b1..b8c8f433f2 100644 --- a/src/components/views/elements/Pill.js +++ b/src/components/views/elements/Pill.js @@ -17,7 +17,7 @@ limitations under the License. */ import React from 'react'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import classNames from 'classnames'; import { Room, RoomMember, MatrixClient } from 'matrix-js-sdk'; diff --git a/src/components/views/elements/ReplyThread.js b/src/components/views/elements/ReplyThread.js index 55fd028980..0b766807d5 100644 --- a/src/components/views/elements/ReplyThread.js +++ b/src/components/views/elements/ReplyThread.js @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import {_t} from '../../../languageHandler'; import PropTypes from 'prop-types'; import dis from '../../../dispatcher'; diff --git a/src/components/views/elements/RoomAliasField.js b/src/components/views/elements/RoomAliasField.js index 03f4000e59..2f3ddcb929 100644 --- a/src/components/views/elements/RoomAliasField.js +++ b/src/components/views/elements/RoomAliasField.js @@ -16,7 +16,7 @@ limitations under the License. import { _t } from '../../../languageHandler'; import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import withValidation from './Validation'; import MatrixClientPeg from '../../../MatrixClientPeg'; diff --git a/src/components/views/elements/RoomDirectoryButton.js b/src/components/views/elements/RoomDirectoryButton.js index 1498157ee4..d0bff4beeb 100644 --- a/src/components/views/elements/RoomDirectoryButton.js +++ b/src/components/views/elements/RoomDirectoryButton.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/elements/StartChatButton.js b/src/components/views/elements/StartChatButton.js index 2132d63940..f828f8ae4d 100644 --- a/src/components/views/elements/StartChatButton.js +++ b/src/components/views/elements/StartChatButton.js @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/elements/TagTile.js b/src/components/views/elements/TagTile.js index 767980f0a0..28930bbabe 100644 --- a/src/components/views/elements/TagTile.js +++ b/src/components/views/elements/TagTile.js @@ -21,7 +21,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import classNames from 'classnames'; import { MatrixClient } from 'matrix-js-sdk'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import {_t} from '../../../languageHandler'; import { isOnlyCtrlOrCmdIgnoreShiftKeyEvent } from '../../../Keyboard'; diff --git a/src/components/views/elements/TextWithTooltip.js b/src/components/views/elements/TextWithTooltip.js index f6cef47117..c46bc3bfbb 100644 --- a/src/components/views/elements/TextWithTooltip.js +++ b/src/components/views/elements/TextWithTooltip.js @@ -16,7 +16,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; export default class TextWithTooltip extends React.Component { static propTypes = { diff --git a/src/components/views/elements/TooltipButton.js b/src/components/views/elements/TooltipButton.js index 0cabf776a4..7d50473469 100644 --- a/src/components/views/elements/TooltipButton.js +++ b/src/components/views/elements/TooltipButton.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; module.exports = createReactClass({ displayName: 'TooltipButton', diff --git a/src/components/views/emojipicker/Category.js b/src/components/views/emojipicker/Category.js index ba525b76e2..3c4352105e 100644 --- a/src/components/views/emojipicker/Category.js +++ b/src/components/views/emojipicker/Category.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import { CATEGORY_HEADER_HEIGHT, EMOJI_HEIGHT, EMOJIS_PER_ROW } from "./EmojiPicker"; -import sdk from '../../../index'; +import * as sdk from '../../../index'; const OVERFLOW_ROWS = 3; diff --git a/src/components/views/emojipicker/EmojiPicker.js b/src/components/views/emojipicker/EmojiPicker.js index 0ec11c2b38..060bcbae28 100644 --- a/src/components/views/emojipicker/EmojiPicker.js +++ b/src/components/views/emojipicker/EmojiPicker.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import EMOJIBASE from 'emojibase-data/en/compact.json'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import * as recent from './recent'; diff --git a/src/components/views/emojipicker/QuickReactions.js b/src/components/views/emojipicker/QuickReactions.js index 8444fb2d9c..0ecdd127c2 100644 --- a/src/components/views/emojipicker/QuickReactions.js +++ b/src/components/views/emojipicker/QuickReactions.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { findEmojiData } from '../../../HtmlUtils'; diff --git a/src/components/views/globals/CookieBar.js b/src/components/views/globals/CookieBar.js index 04226468d8..8774e4f1fa 100644 --- a/src/components/views/globals/CookieBar.js +++ b/src/components/views/globals/CookieBar.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Analytics from '../../../Analytics'; export default class CookieBar extends React.Component { diff --git a/src/components/views/globals/NewVersionBar.js b/src/components/views/globals/NewVersionBar.js index abb9334242..c1854ee9f5 100644 --- a/src/components/views/globals/NewVersionBar.js +++ b/src/components/views/globals/NewVersionBar.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from '../../../Modal'; import PlatformPeg from '../../../PlatformPeg'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/globals/PasswordNagBar.js b/src/components/views/globals/PasswordNagBar.js index 0a4996d0ce..74735ca5ea 100644 --- a/src/components/views/globals/PasswordNagBar.js +++ b/src/components/views/globals/PasswordNagBar.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/groups/GroupInviteTile.js b/src/components/views/groups/GroupInviteTile.js index a21b091145..68020c3228 100644 --- a/src/components/views/groups/GroupInviteTile.js +++ b/src/components/views/groups/GroupInviteTile.js @@ -20,7 +20,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import { MatrixClient } from 'matrix-js-sdk'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import {_t} from '../../../languageHandler'; import classNames from 'classnames'; diff --git a/src/components/views/groups/GroupMemberInfo.js b/src/components/views/groups/GroupMemberInfo.js index 3dac90fc35..2dd98f8160 100644 --- a/src/components/views/groups/GroupMemberInfo.js +++ b/src/components/views/groups/GroupMemberInfo.js @@ -21,7 +21,7 @@ import createReactClass from 'create-react-class'; import { MatrixClient } from 'matrix-js-sdk'; import dis from '../../../dispatcher'; import Modal from '../../../Modal'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { GroupMemberType } from '../../../groups'; import GroupStore from '../../../stores/GroupStore'; diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index 3228a862ce..05af70b266 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import GroupStore from '../../../stores/GroupStore'; import PropTypes from 'prop-types'; diff --git a/src/components/views/groups/GroupMemberTile.js b/src/components/views/groups/GroupMemberTile.js index c4b41d23ce..c395b00daa 100644 --- a/src/components/views/groups/GroupMemberTile.js +++ b/src/components/views/groups/GroupMemberTile.js @@ -20,7 +20,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import { MatrixClient } from 'matrix-js-sdk'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import { GroupMemberType } from '../../../groups'; diff --git a/src/components/views/groups/GroupPublicityToggle.js b/src/components/views/groups/GroupPublicityToggle.js index bacf54382a..b885542300 100644 --- a/src/components/views/groups/GroupPublicityToggle.js +++ b/src/components/views/groups/GroupPublicityToggle.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import GroupStore from '../../../stores/GroupStore'; import ToggleSwitch from "../elements/ToggleSwitch"; diff --git a/src/components/views/groups/GroupRoomInfo.js b/src/components/views/groups/GroupRoomInfo.js index f9f7324e23..42d8d89c69 100644 --- a/src/components/views/groups/GroupRoomInfo.js +++ b/src/components/views/groups/GroupRoomInfo.js @@ -20,7 +20,7 @@ import createReactClass from 'create-react-class'; import { MatrixClient } from 'matrix-js-sdk'; import dis from '../../../dispatcher'; import Modal from '../../../Modal'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import GroupStore from '../../../stores/GroupStore'; diff --git a/src/components/views/groups/GroupRoomList.js b/src/components/views/groups/GroupRoomList.js index d57d5e313f..5fd8c9f31d 100644 --- a/src/components/views/groups/GroupRoomList.js +++ b/src/components/views/groups/GroupRoomList.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import GroupStore from '../../../stores/GroupStore'; import PropTypes from 'prop-types'; import { showGroupAddRoomDialog } from '../../../GroupAddressPicker'; diff --git a/src/components/views/groups/GroupRoomTile.js b/src/components/views/groups/GroupRoomTile.js index ae325d4796..fdf7c932d1 100644 --- a/src/components/views/groups/GroupRoomTile.js +++ b/src/components/views/groups/GroupRoomTile.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import {MatrixClient} from 'matrix-js-sdk'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import { GroupRoomType } from '../../../groups'; diff --git a/src/components/views/groups/GroupTile.js b/src/components/views/groups/GroupTile.js index 3b64c10a1e..aacfab9516 100644 --- a/src/components/views/groups/GroupTile.js +++ b/src/components/views/groups/GroupTile.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import {MatrixClient} from 'matrix-js-sdk'; import { Draggable, Droppable } from 'react-beautiful-dnd'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import FlairStore from '../../../stores/FlairStore'; diff --git a/src/components/views/groups/GroupUserSettings.js b/src/components/views/groups/GroupUserSettings.js index 3cd5731b99..0f49043551 100644 --- a/src/components/views/groups/GroupUserSettings.js +++ b/src/components/views/groups/GroupUserSettings.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { MatrixClient } from 'matrix-js-sdk'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/EditHistoryMessage.js b/src/components/views/messages/EditHistoryMessage.js index dfd4db49b3..d4fc926f03 100644 --- a/src/components/views/messages/EditHistoryMessage.js +++ b/src/components/views/messages/EditHistoryMessage.js @@ -22,7 +22,7 @@ import {formatTime} from '../../../DateUtils'; import {MatrixEvent} from 'matrix-js-sdk'; import {pillifyLinks} from '../../../utils/pillify'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import Modal from '../../../Modal'; import classNames from 'classnames'; diff --git a/src/components/views/messages/MFileBody.js b/src/components/views/messages/MFileBody.js index 552b1108d2..cc95bae64b 100644 --- a/src/components/views/messages/MFileBody.js +++ b/src/components/views/messages/MFileBody.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import filesize from 'filesize'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import {decryptFile} from '../../../utils/DecryptFile'; import Tinter from '../../../Tinter'; diff --git a/src/components/views/messages/MImageBody.js b/src/components/views/messages/MImageBody.js index 427056203d..74d103fb2b 100644 --- a/src/components/views/messages/MImageBody.js +++ b/src/components/views/messages/MImageBody.js @@ -22,7 +22,7 @@ import { MatrixClient } from 'matrix-js-sdk'; import MFileBody from './MFileBody'; import Modal from '../../../Modal'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { decryptFile } from '../../../utils/DecryptFile'; import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/messages/MKeyVerificationRequest.js b/src/components/views/messages/MKeyVerificationRequest.js index b2a1724fc6..6b71193b37 100644 --- a/src/components/views/messages/MKeyVerificationRequest.js +++ b/src/components/views/messages/MKeyVerificationRequest.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import MatrixClientPeg from '../../../MatrixClientPeg'; import {verificationMethods} from 'matrix-js-sdk/lib/crypto'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from "../../../Modal"; import { _t } from '../../../languageHandler'; import KeyVerificationStateObserver, {getNameForEventRoom, userLabelForEventRoom} diff --git a/src/components/views/messages/MStickerBody.js b/src/components/views/messages/MStickerBody.js index ed82d49576..9839080661 100644 --- a/src/components/views/messages/MStickerBody.js +++ b/src/components/views/messages/MStickerBody.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import MImageBody from './MImageBody'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; export default class MStickerBody extends MImageBody { // Mostly empty to prevent default behaviour of MImageBody diff --git a/src/components/views/messages/MessageActionBar.js b/src/components/views/messages/MessageActionBar.js index 81e806cf62..36d764f52f 100644 --- a/src/components/views/messages/MessageActionBar.js +++ b/src/components/views/messages/MessageActionBar.js @@ -20,7 +20,7 @@ import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import Modal from '../../../Modal'; import {aboveLeftOf, ContextMenu, ContextMenuButton, useContextMenu} from '../../structures/ContextMenu'; diff --git a/src/components/views/messages/MessageEvent.js b/src/components/views/messages/MessageEvent.js index ba271f95b5..eae6b6f3e3 100644 --- a/src/components/views/messages/MessageEvent.js +++ b/src/components/views/messages/MessageEvent.js @@ -17,7 +17,7 @@ limitations under the License. import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import SettingsStore from "../../../settings/SettingsStore"; import {Mjolnir} from "../../../mjolnir/Mjolnir"; diff --git a/src/components/views/messages/ReactionsRow.js b/src/components/views/messages/ReactionsRow.js index 3a8cd24518..e8c5563c6b 100644 --- a/src/components/views/messages/ReactionsRow.js +++ b/src/components/views/messages/ReactionsRow.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { isContentActionable } from '../../../utils/EventUtils'; import MatrixClientPeg from '../../../MatrixClientPeg'; diff --git a/src/components/views/messages/ReactionsRowButton.js b/src/components/views/messages/ReactionsRowButton.js index 89bd6e7938..22714e4fc7 100644 --- a/src/components/views/messages/ReactionsRowButton.js +++ b/src/components/views/messages/ReactionsRowButton.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; diff --git a/src/components/views/messages/ReactionsRowButtonTooltip.js b/src/components/views/messages/ReactionsRowButtonTooltip.js index d7e1ef3488..2061a9ffc2 100644 --- a/src/components/views/messages/ReactionsRowButtonTooltip.js +++ b/src/components/views/messages/ReactionsRowButtonTooltip.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { unicodeToShortcode } from '../../../HtmlUtils'; import { _t } from '../../../languageHandler'; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; diff --git a/src/components/views/messages/RoomAvatarEvent.js b/src/components/views/messages/RoomAvatarEvent.js index 513e104d12..c72190ad1c 100644 --- a/src/components/views/messages/RoomAvatarEvent.js +++ b/src/components/views/messages/RoomAvatarEvent.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from '../../../Modal'; import AccessibleButton from '../elements/AccessibleButton'; diff --git a/src/components/views/messages/TextualBody.js b/src/components/views/messages/TextualBody.js index 6bf45d9193..a5697712ab 100644 --- a/src/components/views/messages/TextualBody.js +++ b/src/components/views/messages/TextualBody.js @@ -23,7 +23,7 @@ import createReactClass from 'create-react-class'; import highlight from 'highlight.js'; import * as HtmlUtils from '../../../HtmlUtils'; import {formatDate} from '../../../DateUtils'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from '../../../Modal'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/TextualEvent.js b/src/components/views/messages/TextualEvent.js index be9adeed77..ed63419029 100644 --- a/src/components/views/messages/TextualEvent.js +++ b/src/components/views/messages/TextualEvent.js @@ -17,8 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; - -const TextForEvent = require('../../../TextForEvent'); +import * as TextForEvent from "../../../TextForEvent"; module.exports = createReactClass({ displayName: 'TextualEvent', diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index af8b4616f8..8201cc6795 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -23,7 +23,7 @@ import classNames from 'classnames'; import {Group, RoomMember, User} from 'matrix-js-sdk'; import dis from '../../../dispatcher'; import Modal from '../../../Modal'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import createRoom from '../../../createRoom'; import DMRoomMap from '../../../utils/DMRoomMap'; @@ -32,7 +32,7 @@ import SdkConfig from '../../../SdkConfig'; import SettingsStore from "../../../settings/SettingsStore"; import {EventTimeline} from "matrix-js-sdk"; import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; -import * as RoomViewStore from "../../../stores/RoomViewStore"; +import RoomViewStore from "../../../stores/RoomViewStore"; import MultiInviter from "../../../utils/MultiInviter"; import GroupStore from "../../../stores/GroupStore"; import MatrixClientPeg from "../../../MatrixClientPeg"; diff --git a/src/components/views/room_settings/RelatedGroupSettings.js b/src/components/views/room_settings/RelatedGroupSettings.js index c30f446f41..f1ecc2ef70 100644 --- a/src/components/views/room_settings/RelatedGroupSettings.js +++ b/src/components/views/room_settings/RelatedGroupSettings.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {MatrixEvent, MatrixClient} from 'matrix-js-sdk'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import ErrorDialog from "../dialogs/ErrorDialog"; diff --git a/src/components/views/room_settings/UrlPreviewSettings.js b/src/components/views/room_settings/UrlPreviewSettings.js index 7a8332cc9f..15a2d6ac63 100644 --- a/src/components/views/room_settings/UrlPreviewSettings.js +++ b/src/components/views/room_settings/UrlPreviewSettings.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import { _t, _td } from '../../../languageHandler'; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; import dis from "../../../dispatcher"; diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index e53570dc5b..907d5bca50 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -22,8 +22,8 @@ import MatrixClientPeg from '../../../MatrixClientPeg'; import AppTile from '../elements/AppTile'; import Modal from '../../../Modal'; import dis from '../../../dispatcher'; -import sdk from '../../../index'; -import ScalarMessaging from '../../../ScalarMessaging'; +import * as sdk from '../../../index'; +import * as ScalarMessaging from '../../../ScalarMessaging'; import { _t } from '../../../languageHandler'; import WidgetUtils from '../../../utils/WidgetUtils'; import WidgetEchoStore from "../../../stores/WidgetEchoStore"; diff --git a/src/components/views/rooms/AuxPanel.js b/src/components/views/rooms/AuxPanel.js index a83160ddbf..7add29af49 100644 --- a/src/components/views/rooms/AuxPanel.js +++ b/src/components/views/rooms/AuxPanel.js @@ -19,9 +19,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import MatrixClientPeg from "../../../MatrixClientPeg"; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from "../../../dispatcher"; -import ObjectUtils from '../../../ObjectUtils'; +import * as ObjectUtils from '../../../ObjectUtils'; import AppsDrawer from './AppsDrawer'; import { _t } from '../../../languageHandler'; import classNames from 'classnames'; diff --git a/src/components/views/rooms/BasicMessageComposer.js b/src/components/views/rooms/BasicMessageComposer.js index c7659e89fb..9638fbe230 100644 --- a/src/components/views/rooms/BasicMessageComposer.js +++ b/src/components/views/rooms/BasicMessageComposer.js @@ -37,7 +37,7 @@ import TypingStore from "../../../stores/TypingStore"; import EMOJIBASE from 'emojibase-data/en/compact.json'; import SettingsStore from "../../../settings/SettingsStore"; import EMOTICON_REGEX from 'emojibase-regex/emoticon'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import {Key} from "../../../Keyboard"; const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s)(' + EMOTICON_REGEX.source + ')\\s$'); diff --git a/src/components/views/rooms/EditMessageComposer.js b/src/components/views/rooms/EditMessageComposer.js index 34b2d92590..d2cd3cc4d3 100644 --- a/src/components/views/rooms/EditMessageComposer.js +++ b/src/components/views/rooms/EditMessageComposer.js @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import {_t} from '../../../languageHandler'; import PropTypes from 'prop-types'; import dis from '../../../dispatcher'; diff --git a/src/components/views/rooms/EntityTile.js b/src/components/views/rooms/EntityTile.js index 0193275ca0..57db1ac240 100644 --- a/src/components/views/rooms/EntityTile.js +++ b/src/components/views/rooms/EntityTile.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import AccessibleButton from '../elements/AccessibleButton'; import { _t } from '../../../languageHandler'; import classNames from "classnames"; diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 988482df7f..c3e6eb6ccb 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -24,10 +24,10 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; const classNames = require("classnames"); import { _t, _td } from '../../../languageHandler'; +import * as TextForEvent from "../../../TextForEvent"; const Modal = require('../../../Modal'); const sdk = require('../../../index'); -const TextForEvent = require('../../../TextForEvent'); import dis from '../../../dispatcher'; import SettingsStore from "../../../settings/SettingsStore"; @@ -35,8 +35,7 @@ import {EventStatus, MatrixClient} from 'matrix-js-sdk'; import {formatTime} from "../../../DateUtils"; import MatrixClientPeg from '../../../MatrixClientPeg'; import {ALL_RULE_TYPES} from "../../../mjolnir/BanList"; - -const ObjectUtils = require('../../../ObjectUtils'); +import * as ObjectUtils from "../../../ObjectUtils"; const eventTileTypes = { 'm.room.message': 'messages.MessageEvent', diff --git a/src/components/views/rooms/MemberDeviceInfo.js b/src/components/views/rooms/MemberDeviceInfo.js index ff88c6f6e6..4e2f6d4191 100644 --- a/src/components/views/rooms/MemberDeviceInfo.js +++ b/src/components/views/rooms/MemberDeviceInfo.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import classNames from 'classnames'; diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 1a2c8e2212..f2656dddc5 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -34,11 +34,11 @@ import classNames from 'classnames'; import { MatrixClient } from 'matrix-js-sdk'; import dis from '../../../dispatcher'; import Modal from '../../../Modal'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import createRoom from '../../../createRoom'; import DMRoomMap from '../../../utils/DMRoomMap'; -import Unread from '../../../Unread'; +import * as Unread from '../../../Unread'; import { findReadReceiptFromUserId } from '../../../utils/Receipt'; import AccessibleButton from '../elements/AccessibleButton'; import RoomViewStore from '../../../stores/RoomViewStore'; diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 580e3b0d81..ae346cbc70 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; import CallHandler from '../../../CallHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import RoomViewStore from '../../../stores/RoomViewStore'; import Stickerpicker from './Stickerpicker'; diff --git a/src/components/views/rooms/MessageComposerFormatBar.js b/src/components/views/rooms/MessageComposerFormatBar.js index 95c896c6fc..79ae9f34e8 100644 --- a/src/components/views/rooms/MessageComposerFormatBar.js +++ b/src/components/views/rooms/MessageComposerFormatBar.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import classNames from 'classnames'; export default class MessageComposerFormatBar extends React.PureComponent { diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index cc92f7c750..2510adde9f 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -35,7 +35,7 @@ import type {MatrixClient} from 'matrix-js-sdk/lib/matrix'; import {processCommandInput} from '../../../SlashCommands'; import { KeyCode, isOnlyCtrlOrCmdKeyEvent } from '../../../Keyboard'; import Modal from '../../../Modal'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import Analytics from '../../../Analytics'; diff --git a/src/components/views/rooms/ReplyPreview.js b/src/components/views/rooms/ReplyPreview.js index caf8feeea2..a0d56b1116 100644 --- a/src/components/views/rooms/ReplyPreview.js +++ b/src/components/views/rooms/ReplyPreview.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import dis from '../../../dispatcher'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import RoomViewStore from '../../../stores/RoomViewStore'; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/rooms/RoomBreadcrumbs.js b/src/components/views/rooms/RoomBreadcrumbs.js index 79e9f5c862..7611ff58ee 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.js +++ b/src/components/views/rooms/RoomBreadcrumbs.js @@ -21,7 +21,7 @@ import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; import AccessibleButton from '../elements/AccessibleButton'; import RoomAvatar from '../avatars/RoomAvatar'; import classNames from 'classnames'; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import Analytics from "../../../Analytics"; import * as RoomNotifs from '../../../RoomNotifs'; import * as FormattingUtils from "../../../utils/FormattingUtils"; diff --git a/src/components/views/rooms/RoomDetailList.js b/src/components/views/rooms/RoomDetailList.js index 19cd24b6e5..db7b86da4f 100644 --- a/src/components/views/rooms/RoomDetailList.js +++ b/src/components/views/rooms/RoomDetailList.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import React from 'react'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/rooms/RoomDetailRow.js b/src/components/views/rooms/RoomDetailRow.js index 26a4697337..b3a8b68b0d 100644 --- a/src/components/views/rooms/RoomDetailRow.js +++ b/src/components/views/rooms/RoomDetailRow.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import sdk from '../../../index'; +import * as sdk from '../../../index'; import React, {createRef} from 'react'; import { _t } from '../../../languageHandler'; import { linkifyElement } from '../../../HtmlUtils'; diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index eaf2e733ca..9b15cffcf5 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -18,7 +18,7 @@ import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import classNames from 'classnames'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; import Modal from "../../../Modal"; diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index a43a4df158..80b552ea24 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import classNames from 'classnames'; diff --git a/src/components/views/rooms/RoomRecoveryReminder.js b/src/components/views/rooms/RoomRecoveryReminder.js index 6b7366bc4f..b45dd3a32c 100644 --- a/src/components/views/rooms/RoomRecoveryReminder.js +++ b/src/components/views/rooms/RoomRecoveryReminder.js @@ -16,7 +16,7 @@ limitations under the License. import React from "react"; import PropTypes from "prop-types"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import { _t } from "../../../languageHandler"; import Modal from "../../../Modal"; import MatrixClientPeg from "../../../MatrixClientPeg"; diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 817ada9706..0b8aae9d06 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -24,7 +24,7 @@ import classNames from 'classnames'; import dis from '../../../dispatcher'; import MatrixClientPeg from '../../../MatrixClientPeg'; import DMRoomMap from '../../../utils/DMRoomMap'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import {ContextMenu, ContextMenuButton, toRightOf} from '../../structures/ContextMenu'; import * as RoomNotifs from '../../../RoomNotifs'; import * as FormattingUtils from '../../../utils/FormattingUtils'; diff --git a/src/components/views/rooms/RoomTopicEditor.js b/src/components/views/rooms/RoomTopicEditor.js index a7d11313ff..ed55b66a9a 100644 --- a/src/components/views/rooms/RoomTopicEditor.js +++ b/src/components/views/rooms/RoomTopicEditor.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from "../../../languageHandler"; module.exports = createReactClass({ diff --git a/src/components/views/rooms/RoomUpgradeWarningBar.js b/src/components/views/rooms/RoomUpgradeWarningBar.js index 58d959ddcc..f7e167b253 100644 --- a/src/components/views/rooms/RoomUpgradeWarningBar.js +++ b/src/components/views/rooms/RoomUpgradeWarningBar.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/rooms/SearchResultTile.js b/src/components/views/rooms/SearchResultTile.js index 19ed490683..084d4baffc 100644 --- a/src/components/views/rooms/SearchResultTile.js +++ b/src/components/views/rooms/SearchResultTile.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; module.exports = createReactClass({ displayName: 'SearchResult', diff --git a/src/components/views/rooms/SearchableEntityList.js b/src/components/views/rooms/SearchableEntityList.js index 024816c6fc..0bd21635ba 100644 --- a/src/components/views/rooms/SearchableEntityList.js +++ b/src/components/views/rooms/SearchableEntityList.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import { _t } from '../../../languageHandler'; // A list capable of displaying entities which conform to the SearchableEntity diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index af25155588..3b4f3122c0 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -35,7 +35,7 @@ import {parseEvent} from '../../../editor/deserialize'; import {findEditableEvent} from '../../../utils/EventUtils'; import SendHistoryManager from "../../../SendHistoryManager"; import {processCommandInput} from '../../../SlashCommands'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import Modal from '../../../Modal'; import {_t, _td} from '../../../languageHandler'; import ContentMessages from '../../../ContentMessages'; diff --git a/src/components/views/rooms/SimpleRoomHeader.js b/src/components/views/rooms/SimpleRoomHeader.js index e1ade691d2..f22d9fc1d0 100644 --- a/src/components/views/rooms/SimpleRoomHeader.js +++ b/src/components/views/rooms/SimpleRoomHeader.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import AccessibleButton from '../elements/AccessibleButton'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; // cancel button which is shared between room header and simple room header diff --git a/src/components/views/rooms/SlateMessageComposer.js b/src/components/views/rooms/SlateMessageComposer.js index ebd9017d73..7714676565 100644 --- a/src/components/views/rooms/SlateMessageComposer.js +++ b/src/components/views/rooms/SlateMessageComposer.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import { _t, _td } from '../../../languageHandler'; import CallHandler from '../../../CallHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import RoomViewStore from '../../../stores/RoomViewStore'; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; diff --git a/src/components/views/rooms/Stickerpicker.js b/src/components/views/rooms/Stickerpicker.js index 24f256e706..f1f1113836 100644 --- a/src/components/views/rooms/Stickerpicker.js +++ b/src/components/views/rooms/Stickerpicker.js @@ -17,7 +17,7 @@ import React from 'react'; import {_t, _td} from '../../../languageHandler'; import AppTile from '../elements/AppTile'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import AccessibleButton from '../elements/AccessibleButton'; import WidgetUtils from '../../../utils/WidgetUtils'; diff --git a/src/components/views/rooms/ThirdPartyMemberInfo.js b/src/components/views/rooms/ThirdPartyMemberInfo.js index db6ab479a3..991b20f583 100644 --- a/src/components/views/rooms/ThirdPartyMemberInfo.js +++ b/src/components/views/rooms/ThirdPartyMemberInfo.js @@ -20,7 +20,7 @@ import MatrixClientPeg from "../../../MatrixClientPeg"; import {MatrixEvent} from "matrix-js-sdk"; import {_t} from "../../../languageHandler"; import dis from "../../../dispatcher"; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import Modal from "../../../Modal"; import {isValid3pidInvite} from "../../../RoomInvite"; diff --git a/src/components/views/rooms/UserTile.js b/src/components/views/rooms/UserTile.js index 76afda6dd7..006bd81c98 100644 --- a/src/components/views/rooms/UserTile.js +++ b/src/components/views/rooms/UserTile.js @@ -17,8 +17,8 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; +import * as Avatar from '../../../Avatar'; -const Avatar = require("../../../Avatar"); const sdk = require('../../../index'); module.exports = createReactClass({ diff --git a/src/components/views/rooms/WhoIsTypingTile.js b/src/components/views/rooms/WhoIsTypingTile.js index 0e23286eb6..03cc899977 100644 --- a/src/components/views/rooms/WhoIsTypingTile.js +++ b/src/components/views/rooms/WhoIsTypingTile.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import WhoIsTyping from '../../../WhoIsTyping'; +import * as WhoIsTyping from '../../../WhoIsTyping'; import Timer from '../../../utils/Timer'; import MatrixClientPeg from '../../../MatrixClientPeg'; import MemberAvatar from '../avatars/MemberAvatar'; diff --git a/src/components/views/settings/ChangeAvatar.js b/src/components/views/settings/ChangeAvatar.js index 904b17b15f..03147bc06c 100644 --- a/src/components/views/settings/ChangeAvatar.js +++ b/src/components/views/settings/ChangeAvatar.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import MatrixClientPeg from "../../../MatrixClientPeg"; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; module.exports = createReactClass({ diff --git a/src/components/views/settings/ChangeDisplayName.js b/src/components/views/settings/ChangeDisplayName.js index 90c761ba3d..946fe606e5 100644 --- a/src/components/views/settings/ChangeDisplayName.js +++ b/src/components/views/settings/ChangeDisplayName.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/settings/CrossSigningPanel.js b/src/components/views/settings/CrossSigningPanel.js index ccab886f17..5c7f7a21fe 100644 --- a/src/components/views/settings/CrossSigningPanel.js +++ b/src/components/views/settings/CrossSigningPanel.js @@ -18,7 +18,7 @@ import React from 'react'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { accessSecretStorage } from '../../../CrossSigningManager'; export default class CrossSigningPanel extends React.PureComponent { diff --git a/src/components/views/settings/DevicesPanel.js b/src/components/views/settings/DevicesPanel.js index cb5db10be4..2da0a969af 100644 --- a/src/components/views/settings/DevicesPanel.js +++ b/src/components/views/settings/DevicesPanel.js @@ -19,7 +19,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; diff --git a/src/components/views/settings/DevicesPanelEntry.js b/src/components/views/settings/DevicesPanelEntry.js index 98ba29471d..8702f1e553 100644 --- a/src/components/views/settings/DevicesPanelEntry.js +++ b/src/components/views/settings/DevicesPanelEntry.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; import {formatDate} from '../../../DateUtils'; diff --git a/src/components/views/settings/IntegrationManager.js b/src/components/views/settings/IntegrationManager.js index 1ab17ca8a0..7d2bed8de0 100644 --- a/src/components/views/settings/IntegrationManager.js +++ b/src/components/views/settings/IntegrationManager.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import dis from '../../../dispatcher'; diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index 559b1e0ba1..13fc9850b7 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 7345980bff..15899c850c 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; import SettingsStore, {SettingLevel} from '../../../settings/SettingsStore'; diff --git a/src/components/views/settings/SetIdServer.js b/src/components/views/settings/SetIdServer.js index a7a2e01c22..64a5ce751c 100644 --- a/src/components/views/settings/SetIdServer.js +++ b/src/components/views/settings/SetIdServer.js @@ -18,7 +18,7 @@ import url from 'url'; import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from "../../../MatrixClientPeg"; import Modal from '../../../Modal'; import dis from "../../../dispatcher"; diff --git a/src/components/views/settings/SetIntegrationManager.js b/src/components/views/settings/SetIntegrationManager.js index e205f02e6c..da2953482f 100644 --- a/src/components/views/settings/SetIntegrationManager.js +++ b/src/components/views/settings/SetIntegrationManager.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import {_t} from "../../../languageHandler"; import {IntegrationManagers} from "../../../integrations/IntegrationManagers"; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; export default class SetIntegrationManager extends React.Component { diff --git a/src/components/views/settings/account/EmailAddresses.js b/src/components/views/settings/account/EmailAddresses.js index 07f2a60c38..b41fe13805 100644 --- a/src/components/views/settings/account/EmailAddresses.js +++ b/src/components/views/settings/account/EmailAddresses.js @@ -23,7 +23,7 @@ import Field from "../../elements/Field"; import AccessibleButton from "../../elements/AccessibleButton"; import * as Email from "../../../../email"; import AddThreepid from "../../../../AddThreepid"; -import sdk from '../../../../index'; +import * as sdk from '../../../../index'; import Modal from '../../../../Modal'; /* diff --git a/src/components/views/settings/account/PhoneNumbers.js b/src/components/views/settings/account/PhoneNumbers.js index 55e95a9031..57aa5781b1 100644 --- a/src/components/views/settings/account/PhoneNumbers.js +++ b/src/components/views/settings/account/PhoneNumbers.js @@ -23,7 +23,7 @@ import Field from "../../elements/Field"; import AccessibleButton from "../../elements/AccessibleButton"; import AddThreepid from "../../../../AddThreepid"; import CountryDropdown from "../../auth/CountryDropdown"; -import sdk from '../../../../index'; +import * as sdk from '../../../../index'; import Modal from '../../../../Modal'; /* diff --git a/src/components/views/settings/discovery/EmailAddresses.js b/src/components/views/settings/discovery/EmailAddresses.js index cc3d2d0dad..567d2b4374 100644 --- a/src/components/views/settings/discovery/EmailAddresses.js +++ b/src/components/views/settings/discovery/EmailAddresses.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import { _t } from "../../../../languageHandler"; import MatrixClientPeg from "../../../../MatrixClientPeg"; -import sdk from '../../../../index'; +import * as sdk from '../../../../index'; import Modal from '../../../../Modal'; import AddThreepid from '../../../../AddThreepid'; diff --git a/src/components/views/settings/discovery/PhoneNumbers.js b/src/components/views/settings/discovery/PhoneNumbers.js index 4188d1cdc7..84ad7d61e7 100644 --- a/src/components/views/settings/discovery/PhoneNumbers.js +++ b/src/components/views/settings/discovery/PhoneNumbers.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import { _t } from "../../../../languageHandler"; import MatrixClientPeg from "../../../../MatrixClientPeg"; -import sdk from '../../../../index'; +import * as sdk from '../../../../index'; import Modal from '../../../../Modal'; import AddThreepid from '../../../../AddThreepid'; diff --git a/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.js b/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.js index 101cd036e5..4fa3fb8649 100644 --- a/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../../languageHandler"; import MatrixClientPeg from "../../../../../MatrixClientPeg"; -import sdk from "../../../../.."; +import * as sdk from "../../../../.."; import AccessibleButton from "../../../elements/AccessibleButton"; import Modal from "../../../../../Modal"; import dis from "../../../../../dispatcher"; diff --git a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js index 5d707fcf16..4423ef9ecb 100644 --- a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import {_t} from "../../../../../languageHandler"; import RoomProfileSettings from "../../../room_settings/RoomProfileSettings"; import MatrixClientPeg from "../../../../../MatrixClientPeg"; -import sdk from "../../../../.."; +import * as sdk from "../../../../.."; import AccessibleButton from "../../../elements/AccessibleButton"; import {MatrixClient} from "matrix-js-sdk"; import dis from "../../../../../dispatcher"; diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.js b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.js index c826f89916..0c53a13e96 100644 --- a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {_t, _td} from "../../../../../languageHandler"; import MatrixClientPeg from "../../../../../MatrixClientPeg"; -import sdk from "../../../../.."; +import * as sdk from "../../../../.."; import AccessibleButton from "../../../elements/AccessibleButton"; import Modal from "../../../../../Modal"; diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js index b44d7b019d..6dea081d96 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../../languageHandler"; import MatrixClientPeg from "../../../../../MatrixClientPeg"; -import sdk from "../../../../.."; +import * as sdk from "../../../../.."; import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch"; import {SettingLevel} from "../../../../../settings/SettingsStore"; import Modal from "../../../../../Modal"; diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js index cae4b19891..d4182a51d3 100644 --- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js @@ -30,7 +30,7 @@ import PropTypes from "prop-types"; import {enumerateThemes, ThemeWatcher} from "../../../../../theme"; import PlatformPeg from "../../../../../PlatformPeg"; import MatrixClientPeg from "../../../../../MatrixClientPeg"; -import sdk from "../../../../.."; +import * as sdk from "../../../../.."; import Modal from "../../../../../Modal"; import dis from "../../../../../dispatcher"; import {Service, startTermsFlow} from "../../../../../Terms"; diff --git a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js index 6fc854c155..f1d47b5756 100644 --- a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js @@ -21,7 +21,7 @@ import {SettingLevel} from "../../../../../settings/SettingsStore"; import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch"; import SettingsStore from "../../../../../settings/SettingsStore"; import Field from "../../../elements/Field"; -import sdk from "../../../../.."; +import * as sdk from "../../../../.."; import PlatformPeg from "../../../../../PlatformPeg"; export default class PreferencesUserSettingsTab extends React.Component { diff --git a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js index 98ec18df5a..8d0ec5bd69 100644 --- a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js @@ -23,7 +23,7 @@ import * as FormattingUtils from "../../../../../utils/FormattingUtils"; import AccessibleButton from "../../../elements/AccessibleButton"; import Analytics from "../../../../../Analytics"; import Modal from "../../../../../Modal"; -import sdk from "../../../../.."; +import * as sdk from "../../../../.."; import {sleep} from "../../../../../utils/promise"; export class IgnoredUser extends React.Component { diff --git a/src/components/views/terms/InlineTermsAgreement.js b/src/components/views/terms/InlineTermsAgreement.js index 836b34c585..75e8eccea3 100644 --- a/src/components/views/terms/InlineTermsAgreement.js +++ b/src/components/views/terms/InlineTermsAgreement.js @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import PropTypes from "prop-types"; import {_t, pickBestLanguage} from "../../../languageHandler"; -import sdk from "../../.."; +import * as sdk from "../../.."; export default class InlineTermsAgreement extends React.Component { static propTypes = { diff --git a/src/components/views/toasts/VerificationRequestToast.js b/src/components/views/toasts/VerificationRequestToast.js index 89af91c41f..bf64de665a 100644 --- a/src/components/views/toasts/VerificationRequestToast.js +++ b/src/components/views/toasts/VerificationRequestToast.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from "../../../index"; +import * as sdk from "../../../index"; import { _t } from '../../../languageHandler'; import Modal from "../../../Modal"; import MatrixClientPeg from '../../../MatrixClientPeg'; diff --git a/src/components/views/verification/VerificationCancelled.js b/src/components/views/verification/VerificationCancelled.js index baace2ca1e..fc2a287359 100644 --- a/src/components/views/verification/VerificationCancelled.js +++ b/src/components/views/verification/VerificationCancelled.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; export default class VerificationCancelled extends React.Component { diff --git a/src/components/views/verification/VerificationComplete.js b/src/components/views/verification/VerificationComplete.js index 59f7ff924a..2214711b1f 100644 --- a/src/components/views/verification/VerificationComplete.js +++ b/src/components/views/verification/VerificationComplete.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; export default class VerificationComplete extends React.Component { diff --git a/src/components/views/verification/VerificationShowSas.js b/src/components/views/verification/VerificationShowSas.js index e7846a0199..1e7785222f 100644 --- a/src/components/views/verification/VerificationShowSas.js +++ b/src/components/views/verification/VerificationShowSas.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import { _t, _td } from '../../../languageHandler'; function capFirst(s) { diff --git a/src/components/views/voip/CallPreview.js b/src/components/views/voip/CallPreview.js index 15c30dcb5b..24bc29515a 100644 --- a/src/components/views/voip/CallPreview.js +++ b/src/components/views/voip/CallPreview.js @@ -20,7 +20,7 @@ import createReactClass from 'create-react-class'; import RoomViewStore from '../../../stores/RoomViewStore'; import CallHandler from '../../../CallHandler'; import dis from '../../../dispatcher'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; module.exports = createReactClass({ displayName: 'CallPreview', diff --git a/src/components/views/voip/CallView.js b/src/components/views/voip/CallView.js index 3a62ffbac2..e76fbf397f 100644 --- a/src/components/views/voip/CallView.js +++ b/src/components/views/voip/CallView.js @@ -18,7 +18,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import dis from '../../../dispatcher'; import CallHandler from '../../../CallHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/voip/IncomingCallBox.js b/src/components/views/voip/IncomingCallBox.js index 2a2839d103..a7ad7bfdf6 100644 --- a/src/components/views/voip/IncomingCallBox.js +++ b/src/components/views/voip/IncomingCallBox.js @@ -20,7 +20,7 @@ import createReactClass from 'create-react-class'; import MatrixClientPeg from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; module.exports = createReactClass({ displayName: 'IncomingCallBox', diff --git a/src/components/views/voip/VideoView.js b/src/components/views/voip/VideoView.js index 83584bcc68..fbb49ed367 100644 --- a/src/components/views/voip/VideoView.js +++ b/src/components/views/voip/VideoView.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import classNames from 'classnames'; -import sdk from '../../../index'; +import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/createRoom.js b/src/createRoom.js index 0ee90beba8..e0c4922f48 100644 --- a/src/createRoom.js +++ b/src/createRoom.js @@ -16,7 +16,7 @@ limitations under the License. import MatrixClientPeg from './MatrixClientPeg'; import Modal from './Modal'; -import sdk from './index'; +import * as sdk from './index'; import { _t } from './languageHandler'; import dis from "./dispatcher"; import * as Rooms from "./Rooms"; diff --git a/src/cryptodevices.js b/src/cryptodevices.js index 161787fcbb..f56a80e1e4 100644 --- a/src/cryptodevices.js +++ b/src/cryptodevices.js @@ -15,7 +15,7 @@ limitations under the License. */ import Resend from './Resend'; -import sdk from './index'; +import * as sdk from './index'; import dis from './dispatcher'; import Modal from './Modal'; import { _t } from './languageHandler'; diff --git a/src/editor/parts.js b/src/editor/parts.js index f0b713beb6..137018d7e9 100644 --- a/src/editor/parts.js +++ b/src/editor/parts.js @@ -16,7 +16,7 @@ limitations under the License. */ import AutocompleteWrapperModel from "./autocomplete"; -import Avatar from "../Avatar"; +import * as Avatar from "../Avatar"; class BasePart { constructor(text = "") { diff --git a/src/integrations/IntegrationManagerInstance.js b/src/integrations/IntegrationManagerInstance.js index 4958209351..3ffe1e5401 100644 --- a/src/integrations/IntegrationManagerInstance.js +++ b/src/integrations/IntegrationManagerInstance.js @@ -15,7 +15,7 @@ limitations under the License. */ import ScalarAuthClient from "../ScalarAuthClient"; -import sdk from "../index"; +import * as sdk from "../index"; import {dialogTermsInteractionCallback, TermsNotSignedError} from "../Terms"; import type {Room} from "matrix-js-sdk"; import Modal from '../Modal'; diff --git a/src/integrations/IntegrationManagers.js b/src/integrations/IntegrationManagers.js index 6c4d2ae4d4..8400b3dc94 100644 --- a/src/integrations/IntegrationManagers.js +++ b/src/integrations/IntegrationManagers.js @@ -15,7 +15,7 @@ limitations under the License. */ import SdkConfig from '../SdkConfig'; -import sdk from "../index"; +import * as sdk from "../index"; import Modal from '../Modal'; import {IntegrationManagerInstance, KIND_ACCOUNT, KIND_CONFIG, KIND_HOMESERVER} from "./IntegrationManagerInstance"; import type {MatrixClient, MatrixEvent, Room} from "matrix-js-sdk"; diff --git a/src/stores/RoomListStore.js b/src/stores/RoomListStore.js index 134870398f..a0785cf10e 100644 --- a/src/stores/RoomListStore.js +++ b/src/stores/RoomListStore.js @@ -16,7 +16,7 @@ limitations under the License. import {Store} from 'flux/utils'; import dis from '../dispatcher'; import DMRoomMap from '../utils/DMRoomMap'; -import Unread from '../Unread'; +import * as Unread from '../Unread'; import SettingsStore from "../settings/SettingsStore"; /* diff --git a/src/stores/RoomViewStore.js b/src/stores/RoomViewStore.js index a3caf876ef..8b25eba356 100644 --- a/src/stores/RoomViewStore.js +++ b/src/stores/RoomViewStore.js @@ -17,7 +17,7 @@ limitations under the License. import dis from '../dispatcher'; import {Store} from 'flux/utils'; import MatrixClientPeg from '../MatrixClientPeg'; -import sdk from '../index'; +import * as sdk from '../index'; import Modal from '../Modal'; import { _t } from '../languageHandler'; import { getCachedRoomIDForAlias, storeRoomAliasInCache } from '../RoomAliasCache'; diff --git a/src/utils/MultiInviter.js b/src/utils/MultiInviter.js index 887d829d76..2ea1da5bcc 100644 --- a/src/utils/MultiInviter.js +++ b/src/utils/MultiInviter.js @@ -19,7 +19,7 @@ import MatrixClientPeg from '../MatrixClientPeg'; import {getAddressType} from '../UserAddress'; import GroupStore from '../stores/GroupStore'; import {_t} from "../languageHandler"; -import sdk from "../index"; +import * as sdk from "../index"; import Modal from "../Modal"; import SettingsStore from "../settings/SettingsStore"; import {defer} from "./promise"; diff --git a/src/utils/pillify.js b/src/utils/pillify.js index e943cfe657..524b0f75bb 100644 --- a/src/utils/pillify.js +++ b/src/utils/pillify.js @@ -18,7 +18,7 @@ import ReactDOM from 'react-dom'; import MatrixClientPeg from '../MatrixClientPeg'; import SettingsStore from "../settings/SettingsStore"; import PushProcessor from 'matrix-js-sdk/lib/pushprocessor'; -import sdk from '../index'; +import * as sdk from '../index'; export function pillifyLinks(nodes, mxEvent) { const room = MatrixClientPeg.get().getRoom(mxEvent.getRoomId()); diff --git a/src/utils/replaceableComponent.ts b/src/utils/replaceableComponent.ts index 4777e2f395..9f617b27f3 100644 --- a/src/utils/replaceableComponent.ts +++ b/src/utils/replaceableComponent.ts @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import sdk from '../index'; +import * as sdk from '../index'; /** * Replaces a component with a skinned version if a skinned version exists. From be4eeb5e07f79988ef540bc4373ec8ca2d692698 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 19 Dec 2019 18:54:36 -0700 Subject: [PATCH 2/5] Fix js-sdk imports for new module --- src/MatrixClientPeg.js | 6 +++--- src/RoomNotifs.js | 2 +- src/settings/controllers/NotificationControllers.js | 2 +- src/utils/StorageManager.js | 2 +- src/utils/permalinks/Permalinks.js | 2 +- src/utils/pillify.js | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 974c5b6f51..f1713ca51f 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -19,9 +19,9 @@ limitations under the License. import {MatrixClient, MemoryStore} from 'matrix-js-sdk'; -import utils from 'matrix-js-sdk/lib/utils'; -import EventTimeline from 'matrix-js-sdk/lib/models/event-timeline'; -import EventTimelineSet from 'matrix-js-sdk/lib/models/event-timeline-set'; +import * as utils from 'matrix-js-sdk/lib/utils'; +import {EventTimeline} from 'matrix-js-sdk/lib/models/event-timeline'; +import {EventTimelineSet} from 'matrix-js-sdk/lib/models/event-timeline-set'; import * as sdk from './index'; import createMatrixClient from './utils/createMatrixClient'; import SettingsStore from './settings/SettingsStore'; diff --git a/src/RoomNotifs.js b/src/RoomNotifs.js index 5bef4afd25..9fe8bd75e4 100644 --- a/src/RoomNotifs.js +++ b/src/RoomNotifs.js @@ -16,7 +16,7 @@ limitations under the License. */ import MatrixClientPeg from './MatrixClientPeg'; -import PushProcessor from 'matrix-js-sdk/lib/pushprocessor'; +import {PushProcessor} from 'matrix-js-sdk/lib/pushprocessor'; export const ALL_MESSAGES_LOUD = 'all_messages_loud'; export const ALL_MESSAGES = 'all_messages'; diff --git a/src/settings/controllers/NotificationControllers.js b/src/settings/controllers/NotificationControllers.js index e78b67e847..0e24b4baac 100644 --- a/src/settings/controllers/NotificationControllers.js +++ b/src/settings/controllers/NotificationControllers.js @@ -18,7 +18,7 @@ import SettingController from "./SettingController"; import MatrixClientPeg from '../../MatrixClientPeg'; // XXX: This feels wrong. -import PushProcessor from "matrix-js-sdk/lib/pushprocessor"; +import {PushProcessor} from "matrix-js-sdk/lib/pushprocessor"; function isMasterRuleEnabled() { // Return the value of the master push rule as a default diff --git a/src/utils/StorageManager.js b/src/utils/StorageManager.js index 49a120a470..39466d66ce 100644 --- a/src/utils/StorageManager.js +++ b/src/utils/StorageManager.js @@ -15,7 +15,7 @@ limitations under the License. */ import Matrix from 'matrix-js-sdk'; -import LocalStorageCryptoStore from 'matrix-js-sdk/lib/crypto/store/localStorage-crypto-store'; +import {LocalStorageCryptoStore} from 'matrix-js-sdk/lib/crypto/store/localStorage-crypto-store'; import Analytics from '../Analytics'; const localStorage = window.localStorage; diff --git a/src/utils/permalinks/Permalinks.js b/src/utils/permalinks/Permalinks.js index aec7243236..25845f93a0 100644 --- a/src/utils/permalinks/Permalinks.js +++ b/src/utils/permalinks/Permalinks.js @@ -16,7 +16,7 @@ limitations under the License. import MatrixClientPeg from "../../MatrixClientPeg"; import isIp from "is-ip"; -import utils from 'matrix-js-sdk/lib/utils'; +import * as utils from 'matrix-js-sdk/lib/utils'; import SpecPermalinkConstructor, {baseUrl as matrixtoBaseUrl} from "./SpecPermalinkConstructor"; import PermalinkConstructor, {PermalinkParts} from "./PermalinkConstructor"; import RiotPermalinkConstructor from "./RiotPermalinkConstructor"; diff --git a/src/utils/pillify.js b/src/utils/pillify.js index 524b0f75bb..d0675e4097 100644 --- a/src/utils/pillify.js +++ b/src/utils/pillify.js @@ -17,7 +17,7 @@ limitations under the License. import ReactDOM from 'react-dom'; import MatrixClientPeg from '../MatrixClientPeg'; import SettingsStore from "../settings/SettingsStore"; -import PushProcessor from 'matrix-js-sdk/lib/pushprocessor'; +import {PushProcessor} from 'matrix-js-sdk/lib/pushprocessor'; import * as sdk from '../index'; export function pillifyLinks(nodes, mxEvent) { From 806d728d597c2d68a4f3d3307bd00b05b570146a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 19 Dec 2019 19:08:43 -0700 Subject: [PATCH 3/5] Import from the js-sdk's src/ directory Because ES6 and such. --- src/CrossSigningManager.js | 4 ++-- src/MatrixClientPeg.js | 8 ++++---- src/RoomNotifs.js | 2 +- src/components/views/auth/ServerConfig.js | 2 +- src/components/views/dialogs/DeviceVerifyDialog.js | 2 +- src/components/views/messages/MKeyVerificationRequest.js | 2 +- src/components/views/rooms/MessageComposerInput.js | 2 +- src/components/views/settings/KeyBackupPanel.js | 2 +- src/components/views/toasts/VerificationRequestToast.js | 2 +- src/settings/controllers/NotificationControllers.js | 2 +- src/utils/StorageManager.js | 2 +- src/utils/permalinks/Permalinks.js | 2 +- src/utils/pillify.js | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index 9f7b9e97ce..a0919ddb28 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -17,8 +17,8 @@ limitations under the License. import Modal from './Modal'; import * as sdk from './index'; import MatrixClientPeg from './MatrixClientPeg'; -import { deriveKey } from 'matrix-js-sdk/lib/crypto/key_passphrase'; -import { decodeRecoveryKey } from 'matrix-js-sdk/lib/crypto/recoverykey'; +import { deriveKey } from 'matrix-js-sdk/src/crypto/key_passphrase'; +import { decodeRecoveryKey } from 'matrix-js-sdk/src/crypto/recoverykey'; import { _t } from './languageHandler'; // This stores the secret storage private keys in memory for the JS SDK. This is diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index f1713ca51f..44a05c2d6e 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -19,15 +19,15 @@ limitations under the License. import {MatrixClient, MemoryStore} from 'matrix-js-sdk'; -import * as utils from 'matrix-js-sdk/lib/utils'; -import {EventTimeline} from 'matrix-js-sdk/lib/models/event-timeline'; -import {EventTimelineSet} from 'matrix-js-sdk/lib/models/event-timeline-set'; +import * as utils from 'matrix-js-sdk/src/utils'; +import {EventTimeline} from 'matrix-js-sdk/src/models/event-timeline'; +import {EventTimelineSet} from 'matrix-js-sdk/src/models/event-timeline-set'; import * as sdk from './index'; import createMatrixClient from './utils/createMatrixClient'; import SettingsStore from './settings/SettingsStore'; import MatrixActionCreators from './actions/MatrixActionCreators'; import Modal from './Modal'; -import {verificationMethods} from 'matrix-js-sdk/lib/crypto'; +import {verificationMethods} from 'matrix-js-sdk/src/crypto'; import MatrixClientBackedSettingsHandler from "./settings/handlers/MatrixClientBackedSettingsHandler"; import * as StorageManager from './utils/StorageManager'; import IdentityAuthClient from './IdentityAuthClient'; diff --git a/src/RoomNotifs.js b/src/RoomNotifs.js index 9fe8bd75e4..efc647436b 100644 --- a/src/RoomNotifs.js +++ b/src/RoomNotifs.js @@ -16,7 +16,7 @@ limitations under the License. */ import MatrixClientPeg from './MatrixClientPeg'; -import {PushProcessor} from 'matrix-js-sdk/lib/pushprocessor'; +import {PushProcessor} from 'matrix-js-sdk/src/pushprocessor'; export const ALL_MESSAGES_LOUD = 'all_messages_loud'; export const ALL_MESSAGES = 'all_messages'; diff --git a/src/components/views/auth/ServerConfig.js b/src/components/views/auth/ServerConfig.js index a86e27b6c2..5e17d50b55 100644 --- a/src/components/views/auth/ServerConfig.js +++ b/src/components/views/auth/ServerConfig.js @@ -24,7 +24,7 @@ import { _t } from '../../../languageHandler'; import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils"; import SdkConfig from "../../../SdkConfig"; -import { createClient } from 'matrix-js-sdk/lib/matrix'; +import { createClient } from 'matrix-js-sdk/src/matrix'; import classNames from 'classnames'; /* diff --git a/src/components/views/dialogs/DeviceVerifyDialog.js b/src/components/views/dialogs/DeviceVerifyDialog.js index 708dfb1dd6..8cf5a8536e 100644 --- a/src/components/views/dialogs/DeviceVerifyDialog.js +++ b/src/components/views/dialogs/DeviceVerifyDialog.js @@ -23,7 +23,7 @@ import MatrixClientPeg from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import * as FormattingUtils from '../../../utils/FormattingUtils'; import { _t } from '../../../languageHandler'; -import {verificationMethods} from 'matrix-js-sdk/lib/crypto'; +import {verificationMethods} from 'matrix-js-sdk/src/crypto'; import DMRoomMap from '../../../utils/DMRoomMap'; import createRoom from "../../../createRoom"; import dis from "../../../dispatcher"; diff --git a/src/components/views/messages/MKeyVerificationRequest.js b/src/components/views/messages/MKeyVerificationRequest.js index 6b71193b37..ca5b858f2f 100644 --- a/src/components/views/messages/MKeyVerificationRequest.js +++ b/src/components/views/messages/MKeyVerificationRequest.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import {verificationMethods} from 'matrix-js-sdk/lib/crypto'; +import {verificationMethods} from 'matrix-js-sdk/src/crypto'; import * as sdk from '../../../index'; import Modal from "../../../Modal"; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 2510adde9f..c58fe677f5 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -31,7 +31,7 @@ import PlainWithPillsSerializer from "../../../autocomplete/PlainWithPillsSerial import classNames from 'classnames'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import type {MatrixClient} from 'matrix-js-sdk/lib/matrix'; +import type {MatrixClient} from 'matrix-js-sdk/src/matrix'; import {processCommandInput} from '../../../SlashCommands'; import { KeyCode, isOnlyCtrlOrCmdKeyEvent } from '../../../Keyboard'; import Modal from '../../../Modal'; diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index 13fc9850b7..3eb9d5ac72 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -21,7 +21,7 @@ import * as sdk from '../../../index'; import MatrixClientPeg from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; -import SettingsStore from '../../../../lib/settings/SettingsStore'; +import SettingsStore from '../../../../src/settings/SettingsStore'; import { accessSecretStorage } from '../../../CrossSigningManager'; export default class KeyBackupPanel extends React.PureComponent { diff --git a/src/components/views/toasts/VerificationRequestToast.js b/src/components/views/toasts/VerificationRequestToast.js index bf64de665a..abc79c38d0 100644 --- a/src/components/views/toasts/VerificationRequestToast.js +++ b/src/components/views/toasts/VerificationRequestToast.js @@ -20,7 +20,7 @@ import * as sdk from "../../../index"; import { _t } from '../../../languageHandler'; import Modal from "../../../Modal"; import MatrixClientPeg from '../../../MatrixClientPeg'; -import {verificationMethods} from 'matrix-js-sdk/lib/crypto'; +import {verificationMethods} from 'matrix-js-sdk/src/crypto'; import KeyVerificationStateObserver, {userLabelForEventRoom} from "../../../utils/KeyVerificationStateObserver"; import dis from "../../../dispatcher"; diff --git a/src/settings/controllers/NotificationControllers.js b/src/settings/controllers/NotificationControllers.js index 0e24b4baac..37d318eb1d 100644 --- a/src/settings/controllers/NotificationControllers.js +++ b/src/settings/controllers/NotificationControllers.js @@ -18,7 +18,7 @@ import SettingController from "./SettingController"; import MatrixClientPeg from '../../MatrixClientPeg'; // XXX: This feels wrong. -import {PushProcessor} from "matrix-js-sdk/lib/pushprocessor"; +import {PushProcessor} from "matrix-js-sdk/src/pushprocessor"; function isMasterRuleEnabled() { // Return the value of the master push rule as a default diff --git a/src/utils/StorageManager.js b/src/utils/StorageManager.js index 39466d66ce..c5a9f7aeed 100644 --- a/src/utils/StorageManager.js +++ b/src/utils/StorageManager.js @@ -15,7 +15,7 @@ limitations under the License. */ import Matrix from 'matrix-js-sdk'; -import {LocalStorageCryptoStore} from 'matrix-js-sdk/lib/crypto/store/localStorage-crypto-store'; +import {LocalStorageCryptoStore} from 'matrix-js-sdk/src/crypto/store/localStorage-crypto-store'; import Analytics from '../Analytics'; const localStorage = window.localStorage; diff --git a/src/utils/permalinks/Permalinks.js b/src/utils/permalinks/Permalinks.js index 25845f93a0..4b97d1664f 100644 --- a/src/utils/permalinks/Permalinks.js +++ b/src/utils/permalinks/Permalinks.js @@ -16,7 +16,7 @@ limitations under the License. import MatrixClientPeg from "../../MatrixClientPeg"; import isIp from "is-ip"; -import * as utils from 'matrix-js-sdk/lib/utils'; +import * as utils from 'matrix-js-sdk/src/utils'; import SpecPermalinkConstructor, {baseUrl as matrixtoBaseUrl} from "./SpecPermalinkConstructor"; import PermalinkConstructor, {PermalinkParts} from "./PermalinkConstructor"; import RiotPermalinkConstructor from "./RiotPermalinkConstructor"; diff --git a/src/utils/pillify.js b/src/utils/pillify.js index d0675e4097..044b04181e 100644 --- a/src/utils/pillify.js +++ b/src/utils/pillify.js @@ -17,7 +17,7 @@ limitations under the License. import ReactDOM from 'react-dom'; import MatrixClientPeg from '../MatrixClientPeg'; import SettingsStore from "../settings/SettingsStore"; -import {PushProcessor} from 'matrix-js-sdk/lib/pushprocessor'; +import {PushProcessor} from 'matrix-js-sdk/src/pushprocessor'; import * as sdk from '../index'; export function pillifyLinks(nodes, mxEvent) { From 042bd35d79bb640b6f454194a1924f0175a8e665 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 20 Dec 2019 14:13:46 -0700 Subject: [PATCH 4/5] Fix MatrixClientPeg imports --- src/AddThreepid.js | 2 +- src/Avatar.js | 2 +- src/CallHandler.js | 2 +- src/ContentMessages.js | 2 +- src/CrossSigningManager.js | 2 +- src/FromWidgetPostMessageApi.js | 2 +- src/GroupAddressPicker.js | 2 +- src/HtmlUtils.js | 2 +- src/IdentityAuthClient.js | 2 +- src/Lifecycle.js | 2 +- src/MatrixClientPeg.js | 5 ----- src/Notifier.js | 2 +- src/Presence.js | 2 +- src/Registration.js | 2 +- src/Resend.js | 2 +- src/RoomInvite.js | 2 +- src/RoomNotifs.js | 2 +- src/Rooms.js | 2 +- src/ScalarAuthClient.js | 3 +-- src/ScalarMessaging.js | 2 +- src/Searching.js | 2 +- src/SlashCommands.js | 2 +- src/Terms.js | 2 +- src/TextForEvent.js | 2 +- src/Unread.js | 2 +- src/VectorConferenceHandler.js | 2 +- src/WhoIsTyping.js | 2 +- src/WidgetMessaging.js | 2 +- src/async-components/views/dialogs/EncryptedEventDialog.js | 3 ++- .../views/dialogs/keybackup/CreateKeyBackupDialog.js | 2 +- .../views/dialogs/keybackup/NewRecoveryMethodDialog.js | 2 +- .../views/dialogs/secretstorage/CreateSecretStorageDialog.js | 2 +- src/autocomplete/CommunityProvider.js | 2 +- src/autocomplete/NotifProvider.js | 2 +- src/autocomplete/RoomProvider.js | 2 +- src/autocomplete/UserProvider.js | 2 +- src/components/structures/EmbeddedPage.js | 2 +- src/components/structures/FilePanel.js | 2 +- src/components/structures/GroupView.js | 2 +- src/components/structures/LoggedInView.js | 2 +- src/components/structures/MatrixChat.js | 2 +- src/components/structures/MessagePanel.js | 2 +- src/components/structures/NotificationPanel.js | 3 ++- src/components/structures/RoomDirectory.js | 4 ++-- src/components/structures/RoomStatusBar.js | 2 +- src/components/structures/RoomView.js | 2 +- src/components/structures/TimelinePanel.js | 2 +- src/components/structures/TopLeftMenuButton.js | 2 +- src/components/structures/UserView.js | 2 +- src/components/structures/auth/PostRegistration.js | 2 +- src/components/structures/auth/Registration.js | 2 +- src/components/structures/auth/SoftLogout.js | 2 +- src/components/views/avatars/GroupAvatar.js | 2 +- src/components/views/avatars/MemberStatusMessageAvatar.js | 2 +- src/components/views/avatars/RoomAvatar.js | 2 +- src/components/views/context_menus/MessageContextMenu.js | 2 +- src/components/views/context_menus/RoomTileContextMenu.js | 2 +- .../views/context_menus/StatusMessageContextMenu.js | 2 +- src/components/views/context_menus/TopLeftMenu.js | 2 +- src/components/views/dialogs/AddressPickerDialog.js | 2 +- src/components/views/dialogs/BaseDialog.js | 2 +- src/components/views/dialogs/CreateGroupDialog.js | 2 +- src/components/views/dialogs/CreateRoomDialog.js | 2 +- src/components/views/dialogs/DeactivateAccountDialog.js | 2 +- src/components/views/dialogs/DeviceVerifyDialog.js | 2 +- src/components/views/dialogs/DevtoolsDialog.js | 2 +- src/components/views/dialogs/IncomingSasDialog.js | 2 +- src/components/views/dialogs/LogoutDialog.js | 2 +- src/components/views/dialogs/MessageEditHistoryDialog.js | 2 +- src/components/views/dialogs/ReportEventDialog.js | 2 +- src/components/views/dialogs/RoomSettingsDialog.js | 2 +- src/components/views/dialogs/RoomUpgradeDialog.js | 2 +- src/components/views/dialogs/RoomUpgradeWarningDialog.js | 2 +- src/components/views/dialogs/SetMxIdDialog.js | 2 +- src/components/views/dialogs/UnknownDeviceDialog.js | 2 +- .../views/dialogs/keybackup/RestoreKeyBackupDialog.js | 2 +- .../views/dialogs/secretstorage/AccessSecretStorageDialog.js | 2 +- src/components/views/directory/NetworkDropdown.js | 2 +- src/components/views/elements/AddressTile.js | 2 +- src/components/views/elements/AppPermission.js | 2 +- src/components/views/elements/AppTile.js | 2 +- src/components/views/elements/DeviceVerifyButtons.js | 2 +- src/components/views/elements/ErrorBoundary.js | 2 +- src/components/views/elements/ImageView.js | 4 +--- src/components/views/elements/PersistentApp.js | 2 +- src/components/views/elements/Pill.js | 2 +- src/components/views/elements/RoomAliasField.js | 2 +- src/components/views/emojipicker/ReactionPicker.js | 2 +- src/components/views/groups/GroupInviteTile.js | 2 +- src/components/views/messages/EditHistoryMessage.js | 2 +- src/components/views/messages/MAudioBody.js | 2 +- src/components/views/messages/MFileBody.js | 2 +- src/components/views/messages/MKeyVerificationConclusion.js | 2 +- src/components/views/messages/MKeyVerificationRequest.js | 2 +- src/components/views/messages/MVideoBody.js | 2 +- src/components/views/messages/ReactionsRow.js | 2 +- src/components/views/messages/ReactionsRowButton.js | 2 +- src/components/views/messages/ReactionsRowButtonTooltip.js | 2 +- src/components/views/messages/RoomAvatarEvent.js | 2 +- src/components/views/messages/RoomCreate.js | 2 +- src/components/views/right_panel/UserInfo.js | 2 +- src/components/views/room_settings/AliasSettings.js | 2 +- src/components/views/room_settings/RoomProfileSettings.js | 2 +- src/components/views/room_settings/UrlPreviewSettings.js | 2 +- src/components/views/rooms/AppsDrawer.js | 2 +- src/components/views/rooms/AuxPanel.js | 2 +- src/components/views/rooms/EventTile.js | 2 +- src/components/views/rooms/LinkPreviewWidget.js | 2 +- src/components/views/rooms/MemberInfo.js | 2 +- src/components/views/rooms/MemberList.js | 2 +- src/components/views/rooms/MessageComposer.js | 2 +- src/components/views/rooms/MessageComposerInput.js | 2 +- src/components/views/rooms/PinnedEventTile.js | 2 +- src/components/views/rooms/PinnedEventsPanel.js | 2 +- src/components/views/rooms/RoomBreadcrumbs.js | 2 +- src/components/views/rooms/RoomDetailRow.js | 2 +- src/components/views/rooms/RoomHeader.js | 2 +- src/components/views/rooms/RoomList.js | 2 +- src/components/views/rooms/RoomNameEditor.js | 2 +- src/components/views/rooms/RoomPreviewBar.js | 2 +- src/components/views/rooms/RoomRecoveryReminder.js | 2 +- src/components/views/rooms/RoomTile.js | 2 +- src/components/views/rooms/RoomUpgradeWarningBar.js | 2 +- src/components/views/rooms/SlateMessageComposer.js | 2 +- src/components/views/rooms/Stickerpicker.js | 2 +- src/components/views/rooms/ThirdPartyMemberInfo.js | 2 +- src/components/views/rooms/WhoIsTypingTile.js | 2 +- src/components/views/settings/ChangeAvatar.js | 2 +- src/components/views/settings/ChangeDisplayName.js | 2 +- src/components/views/settings/ChangePassword.js | 2 +- src/components/views/settings/CrossSigningPanel.js | 2 +- src/components/views/settings/DevicesPanel.js | 2 +- src/components/views/settings/DevicesPanelEntry.js | 2 +- src/components/views/settings/KeyBackupPanel.js | 2 +- src/components/views/settings/Notifications.js | 2 +- src/components/views/settings/ProfileSettings.js | 2 +- src/components/views/settings/SetIdServer.js | 2 +- src/components/views/settings/account/EmailAddresses.js | 2 +- src/components/views/settings/account/PhoneNumbers.js | 2 +- src/components/views/settings/discovery/EmailAddresses.js | 2 +- src/components/views/settings/discovery/PhoneNumbers.js | 2 +- .../views/settings/tabs/room/AdvancedRoomSettingsTab.js | 2 +- .../views/settings/tabs/room/GeneralRoomSettingsTab.js | 2 +- .../views/settings/tabs/room/NotificationSettingsTab.js | 2 +- .../views/settings/tabs/room/RolesRoomSettingsTab.js | 2 +- .../views/settings/tabs/room/SecurityRoomSettingsTab.js | 2 +- .../views/settings/tabs/user/FlairUserSettingsTab.js | 2 +- .../views/settings/tabs/user/GeneralUserSettingsTab.js | 2 +- .../views/settings/tabs/user/HelpUserSettingsTab.js | 2 +- .../views/settings/tabs/user/MjolnirUserSettingsTab.js | 2 +- .../views/settings/tabs/user/SecurityUserSettingsTab.js | 2 +- .../views/settings/tabs/user/VoiceUserSettingsTab.js | 2 +- src/components/views/toasts/VerificationRequestToast.js | 2 +- src/components/views/voip/CallView.js | 2 +- src/components/views/voip/IncomingCallBox.js | 2 +- src/createRoom.js | 2 +- src/indexing/EventIndex.js | 2 +- src/integrations/IntegrationManagers.js | 2 +- src/mjolnir/BanList.js | 2 +- src/mjolnir/Mjolnir.js | 2 +- src/rageshake/submit-rageshake.js | 2 +- src/settings/controllers/NotificationControllers.js | 2 +- src/settings/handlers/AccountSettingsHandler.js | 2 +- src/settings/handlers/DeviceSettingsHandler.js | 2 +- src/settings/handlers/RoomAccountSettingsHandler.js | 2 +- src/settings/handlers/RoomSettingsHandler.js | 2 +- src/stores/ActiveWidgetStore.js | 2 +- src/stores/GroupStore.js | 2 +- src/stores/RoomViewStore.js | 2 +- src/stores/TagOrderStore.js | 2 +- src/stores/TypingStore.js | 2 +- src/utils/DMRoomMap.js | 2 +- src/utils/DecryptFile.js | 2 +- src/utils/EventUtils.js | 2 +- src/utils/HostingLink.js | 2 +- src/utils/IdentityServerUtils.js | 2 +- src/utils/KeyVerificationStateObserver.js | 2 +- src/utils/MultiInviter.js | 2 +- src/utils/PasswordScorer.js | 2 +- src/utils/WidgetUtils.js | 2 +- src/utils/permalinks/Permalinks.js | 2 +- src/utils/pillify.js | 2 +- test/ScalarAuthClient-test.js | 2 +- test/Terms-test.js | 2 +- test/components/structures/GroupView-test.js | 2 +- test/components/structures/MessagePanel-test.js | 2 +- test/components/views/dialogs/InteractiveAuthDialog-test.js | 2 +- test/components/views/groups/GroupMemberList-test.js | 2 +- test/components/views/rooms/MemberList-test.js | 2 +- test/components/views/rooms/MessageComposerInput-test.js | 2 +- test/components/views/rooms/RoomList-test.js | 2 +- test/components/views/rooms/RoomSettings-test.js | 2 +- 192 files changed, 194 insertions(+), 200 deletions(-) diff --git a/src/AddThreepid.js b/src/AddThreepid.js index 4d027e4cfb..7a3250d0ca 100644 --- a/src/AddThreepid.js +++ b/src/AddThreepid.js @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import * as sdk from './index'; import Modal from './Modal'; import { _t } from './languageHandler'; diff --git a/src/Avatar.js b/src/Avatar.js index 17860698cb..c74f21bd37 100644 --- a/src/Avatar.js +++ b/src/Avatar.js @@ -16,7 +16,7 @@ limitations under the License. 'use strict'; import {ContentRepo} from 'matrix-js-sdk'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import DMRoomMap from './utils/DMRoomMap'; module.exports = { diff --git a/src/CallHandler.js b/src/CallHandler.js index a5e6c34ab3..2c22b12a3d 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -53,7 +53,7 @@ limitations under the License. * } */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import PlatformPeg from './PlatformPeg'; import Modal from './Modal'; import * as sdk from './index'; diff --git a/src/ContentMessages.js b/src/ContentMessages.js index 4b8b911cfa..0752b0e59d 100644 --- a/src/ContentMessages.js +++ b/src/ContentMessages.js @@ -19,7 +19,7 @@ limitations under the License. import extend from './extend'; import dis from './dispatcher'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import * as sdk from './index'; import { _t } from './languageHandler'; import Modal from './Modal'; diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index a0919ddb28..a242042bdb 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -16,7 +16,7 @@ limitations under the License. import Modal from './Modal'; import * as sdk from './index'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import { deriveKey } from 'matrix-js-sdk/src/crypto/key_passphrase'; import { decodeRecoveryKey } from 'matrix-js-sdk/src/crypto/recoverykey'; import { _t } from './languageHandler'; diff --git a/src/FromWidgetPostMessageApi.js b/src/FromWidgetPostMessageApi.js index 8915c1412f..64caba0fdf 100644 --- a/src/FromWidgetPostMessageApi.js +++ b/src/FromWidgetPostMessageApi.js @@ -20,7 +20,7 @@ import URL from 'url'; import dis from './dispatcher'; import WidgetMessagingEndpoint from './WidgetMessagingEndpoint'; import ActiveWidgetStore from './stores/ActiveWidgetStore'; -import MatrixClientPeg from "./MatrixClientPeg"; +import {MatrixClientPeg} from "./MatrixClientPeg"; import RoomViewStore from "./stores/RoomViewStore"; import {IntegrationManagers} from "./integrations/IntegrationManagers"; import SettingsStore from "./settings/SettingsStore"; diff --git a/src/GroupAddressPicker.js b/src/GroupAddressPicker.js index 2d34af01eb..9131a89e5d 100644 --- a/src/GroupAddressPicker.js +++ b/src/GroupAddressPicker.js @@ -19,7 +19,7 @@ import Modal from './Modal'; import * as sdk from './'; import MultiInviter from './utils/MultiInviter'; import { _t } from './languageHandler'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import GroupStore from './stores/GroupStore'; import {allSettled} from "./utils/promise"; diff --git a/src/HtmlUtils.js b/src/HtmlUtils.js index 2b7384a5aa..3402ee13e3 100644 --- a/src/HtmlUtils.js +++ b/src/HtmlUtils.js @@ -29,7 +29,7 @@ import linkifyMatrix from './linkify-matrix'; import _linkifyElement from 'linkifyjs/element'; import _linkifyString from 'linkifyjs/string'; import classNames from 'classnames'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import url from 'url'; import EMOJIBASE from 'emojibase-data/en/compact.json'; diff --git a/src/IdentityAuthClient.js b/src/IdentityAuthClient.js index a501426865..72432b9a44 100644 --- a/src/IdentityAuthClient.js +++ b/src/IdentityAuthClient.js @@ -16,7 +16,7 @@ limitations under the License. import { createClient, SERVICE_TYPES } from 'matrix-js-sdk'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import Modal from './Modal'; import * as sdk from './index'; import { _t } from './languageHandler'; diff --git a/src/Lifecycle.js b/src/Lifecycle.js index 9847c972f4..0796e326a0 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -18,7 +18,7 @@ limitations under the License. import Matrix from 'matrix-js-sdk'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import EventIndexPeg from './indexing/EventIndexPeg'; import createMatrixClient from './utils/createMatrixClient'; import Analytics from './Analytics'; diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 44a05c2d6e..9c939f2fd3 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -248,9 +248,4 @@ if (!global.mxMatrixClientPeg) { global.mxMatrixClientPeg = new _MatrixClientPeg(); } -// We export both because the syntax is slightly different with -// our babel changes. We maintain both for backwards compatibility -// and for babel to be happy. -// TODO: Convert this to a single export -export default global.mxMatrixClientPeg; export const MatrixClientPeg = global.mxMatrixClientPeg; diff --git a/src/Notifier.js b/src/Notifier.js index 73b1eae33c..0c335a8030 100644 --- a/src/Notifier.js +++ b/src/Notifier.js @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import PlatformPeg from './PlatformPeg'; import * as TextForEvent from './TextForEvent'; import Analytics from './Analytics'; diff --git a/src/Presence.js b/src/Presence.js index 8ef988f171..e3f5169c8f 100644 --- a/src/Presence.js +++ b/src/Presence.js @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from "./MatrixClientPeg"; +import {MatrixClientPeg} from "./MatrixClientPeg"; import dis from "./dispatcher"; import Timer from './utils/Timer'; diff --git a/src/Registration.js b/src/Registration.js index e76e7bc5bf..ac8baa3cca 100644 --- a/src/Registration.js +++ b/src/Registration.js @@ -24,7 +24,7 @@ import dis from './dispatcher'; import * as sdk from './index'; import Modal from './Modal'; import { _t } from './languageHandler'; -// import MatrixClientPeg from './MatrixClientPeg'; +// import {MatrixClientPeg} from './MatrixClientPeg'; // Regex for what a "safe" or "Matrix-looking" localpart would be. // TODO: Update as needed for https://github.com/matrix-org/matrix-doc/issues/1514 diff --git a/src/Resend.js b/src/Resend.js index 51ec804c01..31d541630c 100644 --- a/src/Resend.js +++ b/src/Resend.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import dis from './dispatcher'; import { EventStatus } from 'matrix-js-sdk'; diff --git a/src/RoomInvite.js b/src/RoomInvite.js index 80979da372..380bb4a7ac 100644 --- a/src/RoomInvite.js +++ b/src/RoomInvite.js @@ -16,7 +16,7 @@ limitations under the License. */ import React from 'react'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import MultiInviter from './utils/MultiInviter'; import Modal from './Modal'; import { getAddressType } from './UserAddress'; diff --git a/src/RoomNotifs.js b/src/RoomNotifs.js index efc647436b..c67acaf314 100644 --- a/src/RoomNotifs.js +++ b/src/RoomNotifs.js @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import {PushProcessor} from 'matrix-js-sdk/src/pushprocessor'; export const ALL_MESSAGES_LOUD = 'all_messages_loud'; diff --git a/src/Rooms.js b/src/Rooms.js index 239e348b58..f65e0ff218 100644 --- a/src/Rooms.js +++ b/src/Rooms.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; /** * Given a room object, return the alias we should use for it, diff --git a/src/ScalarAuthClient.js b/src/ScalarAuthClient.js index c67f49ba26..99d6c533a9 100644 --- a/src/ScalarAuthClient.js +++ b/src/ScalarAuthClient.js @@ -18,10 +18,9 @@ limitations under the License. import url from 'url'; import SettingsStore from "./settings/SettingsStore"; import { Service, startTermsFlow, TermsNotSignedError } from './Terms'; +import {MatrixClientPeg} from "./MatrixClientPeg"; const request = require('browser-request'); -const MatrixClientPeg = require('./MatrixClientPeg'); - import * as Matrix from 'matrix-js-sdk'; import SdkConfig from "./SdkConfig"; diff --git a/src/ScalarMessaging.js b/src/ScalarMessaging.js index c0ffc3022d..daee7e3296 100644 --- a/src/ScalarMessaging.js +++ b/src/ScalarMessaging.js @@ -232,7 +232,7 @@ Example: } */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import { MatrixEvent } from 'matrix-js-sdk'; import dis from './dispatcher'; import WidgetUtils from './utils/WidgetUtils'; diff --git a/src/Searching.js b/src/Searching.js index f8976c92e4..a5d945f64b 100644 --- a/src/Searching.js +++ b/src/Searching.js @@ -15,7 +15,7 @@ limitations under the License. */ import EventIndexPeg from "./indexing/EventIndexPeg"; -import MatrixClientPeg from "./MatrixClientPeg"; +import {MatrixClientPeg} from "./MatrixClientPeg"; function serverSideSearch(term, roomId = undefined) { let filter; diff --git a/src/SlashCommands.js b/src/SlashCommands.js index b9b7866643..c855b42c29 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import dis from './dispatcher'; import * as sdk from './index'; import {_t, _td} from './languageHandler'; diff --git a/src/Terms.js b/src/Terms.js index f6a4850446..6ae89f9a2c 100644 --- a/src/Terms.js +++ b/src/Terms.js @@ -16,7 +16,7 @@ limitations under the License. import classNames from 'classnames'; -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import * as sdk from './'; import Modal from './Modal'; diff --git a/src/TextForEvent.js b/src/TextForEvent.js index c3c8396e26..8a5bddf617 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import CallHandler from './CallHandler'; import { _t } from './languageHandler'; import * as Roles from './Roles'; diff --git a/src/Unread.js b/src/Unread.js index d5c5993974..8b859a07fe 100644 --- a/src/Unread.js +++ b/src/Unread.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -const MatrixClientPeg = require('./MatrixClientPeg'); +import {MatrixClientPeg} from "./MatrixClientPeg"; import shouldHideEvent from './shouldHideEvent'; const sdk = require('./index'); diff --git a/src/VectorConferenceHandler.js b/src/VectorConferenceHandler.js index e0e333a371..0ade4c9daf 100644 --- a/src/VectorConferenceHandler.js +++ b/src/VectorConferenceHandler.js @@ -16,7 +16,7 @@ limitations under the License. import {createNewMatrixCall, Room} from "matrix-js-sdk"; import CallHandler from './CallHandler'; -import MatrixClientPeg from "./MatrixClientPeg"; +import {MatrixClientPeg} from "./MatrixClientPeg"; // FIXME: this is Riot (Vector) specific code, but will be removed shortly when // we switch over to jitsi entirely for video conferencing. diff --git a/src/WhoIsTyping.js b/src/WhoIsTyping.js index eb09685cbe..8fce6d8311 100644 --- a/src/WhoIsTyping.js +++ b/src/WhoIsTyping.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from "./MatrixClientPeg"; +import {MatrixClientPeg} from "./MatrixClientPeg"; import { _t } from './languageHandler'; module.exports = { diff --git a/src/WidgetMessaging.js b/src/WidgetMessaging.js index 1d8e1b9cd3..d40a8ab637 100644 --- a/src/WidgetMessaging.js +++ b/src/WidgetMessaging.js @@ -23,7 +23,7 @@ limitations under the License. import FromWidgetPostMessageApi from './FromWidgetPostMessageApi'; import ToWidgetPostMessageApi from './ToWidgetPostMessageApi'; import Modal from "./Modal"; -import MatrixClientPeg from "./MatrixClientPeg"; +import {MatrixClientPeg} from "./MatrixClientPeg"; import SettingsStore from "./settings/SettingsStore"; import WidgetOpenIDPermissionsDialog from "./components/views/dialogs/WidgetOpenIDPermissionsDialog"; import WidgetUtils from "./utils/WidgetUtils"; diff --git a/src/async-components/views/dialogs/EncryptedEventDialog.js b/src/async-components/views/dialogs/EncryptedEventDialog.js index 145203136a..64c36962c4 100644 --- a/src/async-components/views/dialogs/EncryptedEventDialog.js +++ b/src/async-components/views/dialogs/EncryptedEventDialog.js @@ -18,8 +18,9 @@ const React = require("react"); import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; + const sdk = require('../../../index'); -const MatrixClientPeg = require("../../../MatrixClientPeg"); module.exports = createReactClass({ displayName: 'EncryptedEventDialog', diff --git a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js index 3b34c2f7a0..56d3c80549 100644 --- a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js +++ b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js @@ -19,7 +19,7 @@ import React from 'react'; import FileSaver from 'file-saver'; import * as sdk from '../../../../index'; -import MatrixClientPeg from '../../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../MatrixClientPeg'; import { scorePassword } from '../../../../utils/PasswordScorer'; import { _t } from '../../../../languageHandler'; diff --git a/src/async-components/views/dialogs/keybackup/NewRecoveryMethodDialog.js b/src/async-components/views/dialogs/keybackup/NewRecoveryMethodDialog.js index 5382aba23b..7a7d130dbe 100644 --- a/src/async-components/views/dialogs/keybackup/NewRecoveryMethodDialog.js +++ b/src/async-components/views/dialogs/keybackup/NewRecoveryMethodDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import PropTypes from "prop-types"; import * as sdk from "../../../../index"; -import MatrixClientPeg from '../../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../MatrixClientPeg'; import dis from "../../../../dispatcher"; import { _t } from "../../../../languageHandler"; import Modal from "../../../../Modal"; diff --git a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js index beb7a22157..df51650719 100644 --- a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import * as sdk from '../../../../index'; -import MatrixClientPeg from '../../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../MatrixClientPeg'; import { scorePassword } from '../../../../utils/PasswordScorer'; import FileSaver from 'file-saver'; import { _t } from '../../../../languageHandler'; diff --git a/src/autocomplete/CommunityProvider.js b/src/autocomplete/CommunityProvider.js index dce1d279ff..e67c53b3f4 100644 --- a/src/autocomplete/CommunityProvider.js +++ b/src/autocomplete/CommunityProvider.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import { _t } from '../languageHandler'; import AutocompleteProvider from './AutocompleteProvider'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import QueryMatcher from './QueryMatcher'; import {PillCompletion} from './Components'; import * as sdk from '../index'; diff --git a/src/autocomplete/NotifProvider.js b/src/autocomplete/NotifProvider.js index 1fb9da95c9..b433e91b05 100644 --- a/src/autocomplete/NotifProvider.js +++ b/src/autocomplete/NotifProvider.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import AutocompleteProvider from './AutocompleteProvider'; import { _t } from '../languageHandler'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import {PillCompletion} from './Components'; import * as sdk from '../index'; import type {Completion, SelectionRange} from "./Autocompleter"; diff --git a/src/autocomplete/RoomProvider.js b/src/autocomplete/RoomProvider.js index 91b4543432..bb7f8ae0c9 100644 --- a/src/autocomplete/RoomProvider.js +++ b/src/autocomplete/RoomProvider.js @@ -20,7 +20,7 @@ limitations under the License. import React from 'react'; import { _t } from '../languageHandler'; import AutocompleteProvider from './AutocompleteProvider'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import QueryMatcher from './QueryMatcher'; import {PillCompletion} from './Components'; import {getDisplayAliasForRoom} from '../Rooms'; diff --git a/src/autocomplete/UserProvider.js b/src/autocomplete/UserProvider.js index 3385e13b72..59075b0752 100644 --- a/src/autocomplete/UserProvider.js +++ b/src/autocomplete/UserProvider.js @@ -25,7 +25,7 @@ import {PillCompletion} from './Components'; import * as sdk from '../index'; import QueryMatcher from './QueryMatcher'; import _sortBy from 'lodash/sortBy'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import type {MatrixEvent, Room, RoomMember, RoomState} from 'matrix-js-sdk'; import {makeUserPermalink} from "../utils/permalinks/Permalinks"; diff --git a/src/components/structures/EmbeddedPage.js b/src/components/structures/EmbeddedPage.js index 8cc8a9424e..85ae414a0a 100644 --- a/src/components/structures/EmbeddedPage.js +++ b/src/components/structures/EmbeddedPage.js @@ -25,7 +25,7 @@ import { _t } from '../../languageHandler'; import sanitizeHtml from 'sanitize-html'; import * as sdk from '../../index'; import dis from '../../dispatcher'; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import { MatrixClient } from 'matrix-js-sdk'; import classnames from 'classnames'; diff --git a/src/components/structures/FilePanel.js b/src/components/structures/FilePanel.js index ef60f71ec9..03fd2e187a 100644 --- a/src/components/structures/FilePanel.js +++ b/src/components/structures/FilePanel.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import Matrix from 'matrix-js-sdk'; import * as sdk from '../../index'; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import { _t } from '../../languageHandler'; /* diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 07a9fbc521..f3e87befa3 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import * as sdk from '../../index'; import dis from '../../dispatcher'; import { getHostingLink } from '../../utils/HostingLink'; diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index 85b794f67f..2cc30a5b39 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -29,7 +29,7 @@ import { fixupColorFonts } from '../../utils/FontManager'; import * as sdk from '../../index'; import dis from '../../dispatcher'; import sessionStore from '../../stores/SessionStore'; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import SettingsStore from "../../settings/SettingsStore"; import RoomListStore from "../../stores/RoomListStore"; import { getHomePageUrl } from '../../utils/pages'; diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 1469324aaf..8dfb3dd74b 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -29,7 +29,7 @@ import 'what-input'; import Analytics from "../../Analytics"; import { DecryptionFailureTracker } from "../../DecryptionFailureTracker"; -import MatrixClientPeg from "../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../MatrixClientPeg"; import PlatformPeg from "../../PlatformPeg"; import SdkConfig from "../../SdkConfig"; import * as RoomListSorter from "../../RoomListSorter"; diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 01644d8aff..54b910732a 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -24,7 +24,7 @@ import shouldHideEvent from '../../shouldHideEvent'; import {wantsDateSeparator} from '../../DateUtils'; import * as sdk from '../../index'; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import SettingsStore from '../../settings/SettingsStore'; import {_t} from "../../languageHandler"; diff --git a/src/components/structures/NotificationPanel.js b/src/components/structures/NotificationPanel.js index 470c7c8728..eb46fbe1dc 100644 --- a/src/components/structures/NotificationPanel.js +++ b/src/components/structures/NotificationPanel.js @@ -18,8 +18,9 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import { _t } from '../../languageHandler'; +import {MatrixClientPeg} from "../../MatrixClientPeg"; + const sdk = require('../../index'); -const MatrixClientPeg = require("../../MatrixClientPeg"); /* * Component which shows the global notification list using a TimelinePanel diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 4823b0976c..f88be944d7 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -18,9 +18,9 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; +import {ContentRepo} from "matrix-js-sdk"; +import {MatrixClientPeg} from "../../MatrixClientPeg"; -const MatrixClientPeg = require('../../MatrixClientPeg'); -const ContentRepo = require("matrix-js-sdk").ContentRepo; const Modal = require('../../Modal'); const sdk = require('../../index'); const dis = require('../../dispatcher'); diff --git a/src/components/structures/RoomStatusBar.js b/src/components/structures/RoomStatusBar.js index a10faa199a..487ccecd31 100644 --- a/src/components/structures/RoomStatusBar.js +++ b/src/components/structures/RoomStatusBar.js @@ -21,7 +21,7 @@ import PropTypes from 'prop-types'; import Matrix from 'matrix-js-sdk'; import { _t, _td } from '../../languageHandler'; import * as sdk from '../../index'; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import Resend from '../../Resend'; import * as cryptodevices from '../../cryptodevices'; import dis from '../../dispatcher'; diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index fbbc8b56ba..198120428b 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -32,7 +32,7 @@ import {Room} from "matrix-js-sdk"; import { _t } from '../../languageHandler'; import {RoomPermalinkCreator} from '../../utils/permalinks/Permalinks'; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import ContentMessages from '../../ContentMessages'; import Modal from '../../Modal'; import * as sdk from '../../index'; diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index d8c2b96424..4763b4104b 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -29,7 +29,7 @@ const EventTimeline = Matrix.EventTimeline; const sdk = require('../../index'); import { _t } from '../../languageHandler'; -const MatrixClientPeg = require("../../MatrixClientPeg"); +import {MatrixClientPeg} from "../../MatrixClientPeg"; const dis = require("../../dispatcher"); import * as ObjectUtils from "../../ObjectUtils"; const Modal = require("../../Modal"); diff --git a/src/components/structures/TopLeftMenuButton.js b/src/components/structures/TopLeftMenuButton.js index 0d7af81a07..967805d099 100644 --- a/src/components/structures/TopLeftMenuButton.js +++ b/src/components/structures/TopLeftMenuButton.js @@ -19,7 +19,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {TopLeftMenu} from '../views/context_menus/TopLeftMenu'; import BaseAvatar from '../views/avatars/BaseAvatar'; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import * as Avatar from '../../Avatar'; import { _t } from '../../languageHandler'; import dis from "../../dispatcher"; diff --git a/src/components/structures/UserView.js b/src/components/structures/UserView.js index 57235093f7..94159a1da4 100644 --- a/src/components/structures/UserView.js +++ b/src/components/structures/UserView.js @@ -18,7 +18,7 @@ limitations under the License. import React from "react"; import PropTypes from "prop-types"; import Matrix from "matrix-js-sdk"; -import MatrixClientPeg from "../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../MatrixClientPeg"; import * as sdk from "../../index"; import Modal from '../../Modal'; import { _t } from '../../languageHandler'; diff --git a/src/components/structures/auth/PostRegistration.js b/src/components/structures/auth/PostRegistration.js index 0395cb8d35..706ab54de4 100644 --- a/src/components/structures/auth/PostRegistration.js +++ b/src/components/structures/auth/PostRegistration.js @@ -18,7 +18,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import AuthPage from "../../views/auth/AuthPage"; diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index 20769be4cd..bcdb1953ba 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -29,7 +29,7 @@ import * as ServerType from '../../views/auth/ServerTypeSelector'; import AutoDiscoveryUtils, {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import classNames from "classnames"; import * as Lifecycle from '../../../Lifecycle'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import AuthPage from "../../views/auth/AuthPage"; // Phases diff --git a/src/components/structures/auth/SoftLogout.js b/src/components/structures/auth/SoftLogout.js index bdc34117d0..63f590da2e 100644 --- a/src/components/structures/auth/SoftLogout.js +++ b/src/components/structures/auth/SoftLogout.js @@ -21,7 +21,7 @@ import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import * as Lifecycle from '../../../Lifecycle'; import Modal from '../../../Modal'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {sendLoginRequest} from "../../../Login"; import url from 'url'; import AuthPage from "../../views/auth/AuthPage"; diff --git a/src/components/views/avatars/GroupAvatar.js b/src/components/views/avatars/GroupAvatar.js index 27122052dd..0da57bcb99 100644 --- a/src/components/views/avatars/GroupAvatar.js +++ b/src/components/views/avatars/GroupAvatar.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; export default createReactClass({ displayName: 'GroupAvatar', diff --git a/src/components/views/avatars/MemberStatusMessageAvatar.js b/src/components/views/avatars/MemberStatusMessageAvatar.js index ed73dd33b9..18af80991a 100644 --- a/src/components/views/avatars/MemberStatusMessageAvatar.js +++ b/src/components/views/avatars/MemberStatusMessageAvatar.js @@ -16,7 +16,7 @@ limitations under the License. import React, {createRef} from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import {_t} from "../../../languageHandler"; import MemberAvatar from '../avatars/MemberAvatar'; import classNames from 'classnames'; diff --git a/src/components/views/avatars/RoomAvatar.js b/src/components/views/avatars/RoomAvatar.js index d1e2ed25bb..55fe7e07b7 100644 --- a/src/components/views/avatars/RoomAvatar.js +++ b/src/components/views/avatars/RoomAvatar.js @@ -17,7 +17,7 @@ import React from "react"; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import {ContentRepo} from "matrix-js-sdk"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import Modal from '../../../Modal'; import * as sdk from "../../../index"; import * as Avatar from '../../../Avatar'; diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 876e3b10ac..3aec0e6752 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -22,7 +22,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import {EventStatus} from 'matrix-js-sdk'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/context_menus/RoomTileContextMenu.js b/src/components/views/context_menus/RoomTileContextMenu.js index d9497d729e..fa4f4f54ba 100644 --- a/src/components/views/context_menus/RoomTileContextMenu.js +++ b/src/components/views/context_menus/RoomTileContextMenu.js @@ -23,7 +23,7 @@ import createReactClass from 'create-react-class'; import classNames from 'classnames'; import * as sdk from '../../../index'; import { _t, _td } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import DMRoomMap from '../../../utils/DMRoomMap'; import * as Rooms from '../../../Rooms'; diff --git a/src/components/views/context_menus/StatusMessageContextMenu.js b/src/components/views/context_menus/StatusMessageContextMenu.js index e9dd42f123..c7cf5607a1 100644 --- a/src/components/views/context_menus/StatusMessageContextMenu.js +++ b/src/components/views/context_menus/StatusMessageContextMenu.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import AccessibleButton from '../elements/AccessibleButton'; diff --git a/src/components/views/context_menus/TopLeftMenu.js b/src/components/views/context_menus/TopLeftMenu.js index b9aabdc608..b75ec7ce36 100644 --- a/src/components/views/context_menus/TopLeftMenu.js +++ b/src/components/views/context_menus/TopLeftMenu.js @@ -23,7 +23,7 @@ import LogoutDialog from "../dialogs/LogoutDialog"; import Modal from "../../../Modal"; import SdkConfig from '../../../SdkConfig'; import { getHostingLink } from '../../../utils/HostingLink'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import {MenuItem} from "../../structures/ContextMenu"; export class TopLeftMenu extends React.Component { diff --git a/src/components/views/dialogs/AddressPickerDialog.js b/src/components/views/dialogs/AddressPickerDialog.js index a1cdb5d5bb..d32833b144 100644 --- a/src/components/views/dialogs/AddressPickerDialog.js +++ b/src/components/views/dialogs/AddressPickerDialog.js @@ -23,7 +23,7 @@ import createReactClass from 'create-react-class'; import { _t, _td } from '../../../languageHandler'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import { addressTypes, getAddressType } from '../../../UserAddress.js'; import GroupStore from '../../../stores/GroupStore'; diff --git a/src/components/views/dialogs/BaseDialog.js b/src/components/views/dialogs/BaseDialog.js index d83ce46360..1a4523ad80 100644 --- a/src/components/views/dialogs/BaseDialog.js +++ b/src/components/views/dialogs/BaseDialog.js @@ -25,7 +25,7 @@ import { MatrixClient } from 'matrix-js-sdk'; import { KeyCode } from '../../../Keyboard'; import AccessibleButton from '../elements/AccessibleButton'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from "../../../languageHandler"; /** diff --git a/src/components/views/dialogs/CreateGroupDialog.js b/src/components/views/dialogs/CreateGroupDialog.js index b88639ba5a..d465ef26a2 100644 --- a/src/components/views/dialogs/CreateGroupDialog.js +++ b/src/components/views/dialogs/CreateGroupDialog.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; export default createReactClass({ displayName: 'CreateGroupDialog', diff --git a/src/components/views/dialogs/CreateRoomDialog.js b/src/components/views/dialogs/CreateRoomDialog.js index cdc63b7f88..41b43af287 100644 --- a/src/components/views/dialogs/CreateRoomDialog.js +++ b/src/components/views/dialogs/CreateRoomDialog.js @@ -21,7 +21,7 @@ import * as sdk from '../../../index'; import SdkConfig from '../../../SdkConfig'; import withValidation from '../elements/Validation'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import {Key} from "../../../Keyboard"; export default createReactClass({ diff --git a/src/components/views/dialogs/DeactivateAccountDialog.js b/src/components/views/dialogs/DeactivateAccountDialog.js index bbf5dbe943..cd284e3be4 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.js +++ b/src/components/views/dialogs/DeactivateAccountDialog.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import * as sdk from '../../../index'; import Analytics from '../../../Analytics'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as Lifecycle from '../../../Lifecycle'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/DeviceVerifyDialog.js b/src/components/views/dialogs/DeviceVerifyDialog.js index 8cf5a8536e..afb623c08b 100644 --- a/src/components/views/dialogs/DeviceVerifyDialog.js +++ b/src/components/views/dialogs/DeviceVerifyDialog.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import * as FormattingUtils from '../../../utils/FormattingUtils'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index dfb15f0e0c..61002f27a2 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import * as sdk from '../../../index'; import SyntaxHighlight from '../elements/SyntaxHighlight'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import Field from "../elements/Field"; class DevtoolsComponent extends React.Component { diff --git a/src/components/views/dialogs/IncomingSasDialog.js b/src/components/views/dialogs/IncomingSasDialog.js index d0a184f543..76323b55ad 100644 --- a/src/components/views/dialogs/IncomingSasDialog.js +++ b/src/components/views/dialogs/IncomingSasDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/LogoutDialog.js b/src/components/views/dialogs/LogoutDialog.js index 67d6574084..64c0b77677 100644 --- a/src/components/views/dialogs/LogoutDialog.js +++ b/src/components/views/dialogs/LogoutDialog.js @@ -19,7 +19,7 @@ import Modal from '../../../Modal'; import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import SettingsStore from "../../../settings/SettingsStore"; export default class LogoutDialog extends React.Component { diff --git a/src/components/views/dialogs/MessageEditHistoryDialog.js b/src/components/views/dialogs/MessageEditHistoryDialog.js index 24c5d3b682..2bdf2be35c 100644 --- a/src/components/views/dialogs/MessageEditHistoryDialog.js +++ b/src/components/views/dialogs/MessageEditHistoryDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import { _t } from '../../../languageHandler'; import * as sdk from "../../../index"; import {wantsDateSeparator} from '../../../DateUtils'; diff --git a/src/components/views/dialogs/ReportEventDialog.js b/src/components/views/dialogs/ReportEventDialog.js index dd5afeb477..3320477557 100644 --- a/src/components/views/dialogs/ReportEventDialog.js +++ b/src/components/views/dialogs/ReportEventDialog.js @@ -19,7 +19,7 @@ import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import PropTypes from "prop-types"; import {MatrixEvent} from "matrix-js-sdk"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; /* * A dialog for reporting an event. diff --git a/src/components/views/dialogs/RoomSettingsDialog.js b/src/components/views/dialogs/RoomSettingsDialog.js index 06a3f1301b..67b30e19c8 100644 --- a/src/components/views/dialogs/RoomSettingsDialog.js +++ b/src/components/views/dialogs/RoomSettingsDialog.js @@ -25,7 +25,7 @@ import GeneralRoomSettingsTab from "../settings/tabs/room/GeneralRoomSettingsTab import SecurityRoomSettingsTab from "../settings/tabs/room/SecurityRoomSettingsTab"; import NotificationSettingsTab from "../settings/tabs/room/NotificationSettingsTab"; import * as sdk from "../../../index"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import dis from "../../../dispatcher"; export default class RoomSettingsDialog extends React.Component { diff --git a/src/components/views/dialogs/RoomUpgradeDialog.js b/src/components/views/dialogs/RoomUpgradeDialog.js index d81958c5f0..dc734718d5 100644 --- a/src/components/views/dialogs/RoomUpgradeDialog.js +++ b/src/components/views/dialogs/RoomUpgradeDialog.js @@ -18,7 +18,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/RoomUpgradeWarningDialog.js b/src/components/views/dialogs/RoomUpgradeWarningDialog.js index 1ee1bec987..02534c5b35 100644 --- a/src/components/views/dialogs/RoomUpgradeWarningDialog.js +++ b/src/components/views/dialogs/RoomUpgradeWarningDialog.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; import * as sdk from "../../../index"; import LabelledToggleSwitch from "../elements/LabelledToggleSwitch"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import Modal from "../../../Modal"; export default class RoomUpgradeWarningDialog extends React.Component { diff --git a/src/components/views/dialogs/SetMxIdDialog.js b/src/components/views/dialogs/SetMxIdDialog.js index dffb98443d..d24715cac0 100644 --- a/src/components/views/dialogs/SetMxIdDialog.js +++ b/src/components/views/dialogs/SetMxIdDialog.js @@ -19,7 +19,7 @@ import React, {createRef} from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import classnames from 'classnames'; import { KeyCode } from '../../../Keyboard'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/UnknownDeviceDialog.js b/src/components/views/dialogs/UnknownDeviceDialog.js index 23e84bbe78..c70383061d 100644 --- a/src/components/views/dialogs/UnknownDeviceDialog.js +++ b/src/components/views/dialogs/UnknownDeviceDialog.js @@ -19,7 +19,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; import { markAllDevicesKnown } from '../../../cryptodevices'; diff --git a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js index 99dd118438..e8f98edc7c 100644 --- a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js +++ b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import * as sdk from '../../../../index'; -import MatrixClientPeg from '../../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../MatrixClientPeg'; import Modal from '../../../../Modal'; import { MatrixClient } from 'matrix-js-sdk'; diff --git a/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js b/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js index 64bf54ce8a..c976eb81d0 100644 --- a/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js +++ b/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from "prop-types"; import * as sdk from '../../../../index'; -import MatrixClientPeg from '../../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../MatrixClientPeg'; import { _t } from '../../../../languageHandler'; import { Key } from "../../../../Keyboard"; diff --git a/src/components/views/directory/NetworkDropdown.js b/src/components/views/directory/NetworkDropdown.js index bae1ecd5c9..cb6a015d86 100644 --- a/src/components/views/directory/NetworkDropdown.js +++ b/src/components/views/directory/NetworkDropdown.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import {instanceForInstanceId} from '../../../utils/DirectoryUtils'; const DEFAULT_ICON_URL = require("../../../../res/img/network-matrix.svg"); diff --git a/src/components/views/elements/AddressTile.js b/src/components/views/elements/AddressTile.js index 5ea6ca110c..36af5059fc 100644 --- a/src/components/views/elements/AddressTile.js +++ b/src/components/views/elements/AddressTile.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import classNames from 'classnames'; import * as sdk from "../../../index"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import { _t } from '../../../languageHandler'; import { UserAddressType } from '../../../UserAddress.js'; diff --git a/src/components/views/elements/AppPermission.js b/src/components/views/elements/AppPermission.js index e08e008259..b96001b106 100644 --- a/src/components/views/elements/AppPermission.js +++ b/src/components/views/elements/AppPermission.js @@ -22,7 +22,7 @@ import url from 'url'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import WidgetUtils from "../../../utils/WidgetUtils"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; export default class AppPermission extends React.Component { static propTypes = { diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 05491cf4d8..4b586b1553 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -20,7 +20,7 @@ import url from 'url'; import qs from 'querystring'; import React, {createRef} from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import WidgetMessaging from '../../../WidgetMessaging'; import AccessibleButton from './AccessibleButton'; import Modal from '../../../Modal'; diff --git a/src/components/views/elements/DeviceVerifyButtons.js b/src/components/views/elements/DeviceVerifyButtons.js index 6867406a03..a9dd919a56 100644 --- a/src/components/views/elements/DeviceVerifyButtons.js +++ b/src/components/views/elements/DeviceVerifyButtons.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/elements/ErrorBoundary.js b/src/components/views/elements/ErrorBoundary.js index 12708863e5..a043b350ab 100644 --- a/src/components/views/elements/ErrorBoundary.js +++ b/src/components/views/elements/ErrorBoundary.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import PlatformPeg from '../../../PlatformPeg'; import Modal from '../../../Modal'; diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index b2f6d0abbb..d92638e005 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -19,9 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; - -const MatrixClientPeg = require('../../../MatrixClientPeg'); - +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {formatDate} from '../../../DateUtils'; const filesize = require('filesize'); const AccessibleButton = require('../../../components/views/elements/AccessibleButton'); diff --git a/src/components/views/elements/PersistentApp.js b/src/components/views/elements/PersistentApp.js index e0155d846b..df1a3196d6 100644 --- a/src/components/views/elements/PersistentApp.js +++ b/src/components/views/elements/PersistentApp.js @@ -20,7 +20,7 @@ import RoomViewStore from '../../../stores/RoomViewStore'; import ActiveWidgetStore from '../../../stores/ActiveWidgetStore'; import WidgetUtils from '../../../utils/WidgetUtils'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; module.exports = createReactClass({ displayName: 'PersistentApp', diff --git a/src/components/views/elements/Pill.js b/src/components/views/elements/Pill.js index b8c8f433f2..d2d7434709 100644 --- a/src/components/views/elements/Pill.js +++ b/src/components/views/elements/Pill.js @@ -22,7 +22,7 @@ import dis from '../../../dispatcher'; import classNames from 'classnames'; import { Room, RoomMember, MatrixClient } from 'matrix-js-sdk'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { getDisplayAliasForRoom } from '../../../Rooms'; import FlairStore from "../../../stores/FlairStore"; import {getPrimaryPermalinkEntity} from "../../../utils/permalinks/Permalinks"; diff --git a/src/components/views/elements/RoomAliasField.js b/src/components/views/elements/RoomAliasField.js index 2f3ddcb929..cacecb5005 100644 --- a/src/components/views/elements/RoomAliasField.js +++ b/src/components/views/elements/RoomAliasField.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import * as sdk from '../../../index'; import withValidation from './Validation'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; export default class RoomAliasField extends React.PureComponent { static propTypes = { diff --git a/src/components/views/emojipicker/ReactionPicker.js b/src/components/views/emojipicker/ReactionPicker.js index c051ab40bb..96894e18d2 100644 --- a/src/components/views/emojipicker/ReactionPicker.js +++ b/src/components/views/emojipicker/ReactionPicker.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from "prop-types"; import EmojiPicker from "./EmojiPicker"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; class ReactionPicker extends React.Component { static propTypes = { diff --git a/src/components/views/groups/GroupInviteTile.js b/src/components/views/groups/GroupInviteTile.js index 68020c3228..0c484435a4 100644 --- a/src/components/views/groups/GroupInviteTile.js +++ b/src/components/views/groups/GroupInviteTile.js @@ -24,7 +24,7 @@ import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import {_t} from '../../../languageHandler'; import classNames from 'classnames'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {ContextMenu, ContextMenuButton, toRightOf} from "../../structures/ContextMenu"; // XXX this class copies a lot from RoomTile.js diff --git a/src/components/views/messages/EditHistoryMessage.js b/src/components/views/messages/EditHistoryMessage.js index d4fc926f03..a28f8e27d8 100644 --- a/src/components/views/messages/EditHistoryMessage.js +++ b/src/components/views/messages/EditHistoryMessage.js @@ -23,7 +23,7 @@ import {MatrixEvent} from 'matrix-js-sdk'; import {pillifyLinks} from '../../../utils/pillify'; import { _t } from '../../../languageHandler'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import Modal from '../../../Modal'; import classNames from 'classnames'; diff --git a/src/components/views/messages/MAudioBody.js b/src/components/views/messages/MAudioBody.js index e10b175bd7..a642936fec 100644 --- a/src/components/views/messages/MAudioBody.js +++ b/src/components/views/messages/MAudioBody.js @@ -19,7 +19,7 @@ import React from 'react'; import MFileBody from './MFileBody'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { decryptFile } from '../../../utils/DecryptFile'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/MFileBody.js b/src/components/views/messages/MFileBody.js index cc95bae64b..2177b110a5 100644 --- a/src/components/views/messages/MFileBody.js +++ b/src/components/views/messages/MFileBody.js @@ -19,7 +19,7 @@ import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import filesize from 'filesize'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import {decryptFile} from '../../../utils/DecryptFile'; diff --git a/src/components/views/messages/MKeyVerificationConclusion.js b/src/components/views/messages/MKeyVerificationConclusion.js index 0bd8e2d3d8..f37f270a77 100644 --- a/src/components/views/messages/MKeyVerificationConclusion.js +++ b/src/components/views/messages/MKeyVerificationConclusion.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import classNames from 'classnames'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import KeyVerificationStateObserver, {getNameForEventRoom, userLabelForEventRoom} from '../../../utils/KeyVerificationStateObserver'; diff --git a/src/components/views/messages/MKeyVerificationRequest.js b/src/components/views/messages/MKeyVerificationRequest.js index ca5b858f2f..5f0a02e6e8 100644 --- a/src/components/views/messages/MKeyVerificationRequest.js +++ b/src/components/views/messages/MKeyVerificationRequest.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import {verificationMethods} from 'matrix-js-sdk/src/crypto'; import * as sdk from '../../../index'; import Modal from "../../../Modal"; diff --git a/src/components/views/messages/MVideoBody.js b/src/components/views/messages/MVideoBody.js index 8366d0dd01..dfbe632e1c 100644 --- a/src/components/views/messages/MVideoBody.js +++ b/src/components/views/messages/MVideoBody.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import MFileBody from './MFileBody'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { decryptFile } from '../../../utils/DecryptFile'; import { _t } from '../../../languageHandler'; import SettingsStore from "../../../settings/SettingsStore"; diff --git a/src/components/views/messages/ReactionsRow.js b/src/components/views/messages/ReactionsRow.js index e8c5563c6b..3451cdbb2d 100644 --- a/src/components/views/messages/ReactionsRow.js +++ b/src/components/views/messages/ReactionsRow.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { isContentActionable } from '../../../utils/EventUtils'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; // The maximum number of reactions to initially show on a message. const MAX_ITEMS_WHEN_LIMITED = 8; diff --git a/src/components/views/messages/ReactionsRowButton.js b/src/components/views/messages/ReactionsRowButton.js index 22714e4fc7..a7ff7dce96 100644 --- a/src/components/views/messages/ReactionsRowButton.js +++ b/src/components/views/messages/ReactionsRowButton.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; diff --git a/src/components/views/messages/ReactionsRowButtonTooltip.js b/src/components/views/messages/ReactionsRowButtonTooltip.js index 2061a9ffc2..59e9d2ad7f 100644 --- a/src/components/views/messages/ReactionsRowButtonTooltip.js +++ b/src/components/views/messages/ReactionsRowButtonTooltip.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import { unicodeToShortcode } from '../../../HtmlUtils'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/RoomAvatarEvent.js b/src/components/views/messages/RoomAvatarEvent.js index c72190ad1c..4ba7083bd2 100644 --- a/src/components/views/messages/RoomAvatarEvent.js +++ b/src/components/views/messages/RoomAvatarEvent.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import * as sdk from '../../../index'; import Modal from '../../../Modal'; diff --git a/src/components/views/messages/RoomCreate.js b/src/components/views/messages/RoomCreate.js index 9bb6fcc0d8..65539da785 100644 --- a/src/components/views/messages/RoomCreate.js +++ b/src/components/views/messages/RoomCreate.js @@ -21,7 +21,7 @@ import createReactClass from 'create-react-class'; import dis from '../../../dispatcher'; import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; module.exports = createReactClass({ displayName: 'RoomCreate', diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index 8201cc6795..dc4accea09 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -35,7 +35,7 @@ import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; import RoomViewStore from "../../../stores/RoomViewStore"; import MultiInviter from "../../../utils/MultiInviter"; import GroupStore from "../../../stores/GroupStore"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import E2EIcon from "../rooms/E2EIcon"; import withLegacyMatrixClient from "../../../utils/withLegacyMatrixClient"; import {useEventEmitter} from "../../../hooks/useEventEmitter"; diff --git a/src/components/views/room_settings/AliasSettings.js b/src/components/views/room_settings/AliasSettings.js index daf5c6edc2..2c43546c60 100644 --- a/src/components/views/room_settings/AliasSettings.js +++ b/src/components/views/room_settings/AliasSettings.js @@ -17,7 +17,7 @@ limitations under the License. const React = require('react'); import PropTypes from 'prop-types'; -const MatrixClientPeg = require('../../../MatrixClientPeg'); +import {MatrixClientPeg} from "../../../MatrixClientPeg"; const sdk = require("../../../index"); import { _t } from '../../../languageHandler'; import Field from "../elements/Field"; diff --git a/src/components/views/room_settings/RoomProfileSettings.js b/src/components/views/room_settings/RoomProfileSettings.js index 76d2e5be84..56732d425d 100644 --- a/src/components/views/room_settings/RoomProfileSettings.js +++ b/src/components/views/room_settings/RoomProfileSettings.js @@ -17,7 +17,7 @@ limitations under the License. import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import Field from "../elements/Field"; import AccessibleButton from "../elements/AccessibleButton"; import classNames from 'classnames'; diff --git a/src/components/views/room_settings/UrlPreviewSettings.js b/src/components/views/room_settings/UrlPreviewSettings.js index 15a2d6ac63..7e94ccad09 100644 --- a/src/components/views/room_settings/UrlPreviewSettings.js +++ b/src/components/views/room_settings/UrlPreviewSettings.js @@ -23,7 +23,7 @@ import * as sdk from "../../../index"; import { _t, _td } from '../../../languageHandler'; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; import dis from "../../../dispatcher"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; module.exports = createReactClass({ diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index 907d5bca50..d73fb633a0 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import AppTile from '../elements/AppTile'; import Modal from '../../../Modal'; import dis from '../../../dispatcher'; diff --git a/src/components/views/rooms/AuxPanel.js b/src/components/views/rooms/AuxPanel.js index 7add29af49..297e64b152 100644 --- a/src/components/views/rooms/AuxPanel.js +++ b/src/components/views/rooms/AuxPanel.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import * as sdk from '../../../index'; import dis from "../../../dispatcher"; import * as ObjectUtils from '../../../ObjectUtils'; diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index c3e6eb6ccb..b0a95e1188 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -33,7 +33,7 @@ import dis from '../../../dispatcher'; import SettingsStore from "../../../settings/SettingsStore"; import {EventStatus, MatrixClient} from 'matrix-js-sdk'; import {formatTime} from "../../../DateUtils"; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import {ALL_RULE_TYPES} from "../../../mjolnir/BanList"; import * as ObjectUtils from "../../../ObjectUtils"; diff --git a/src/components/views/rooms/LinkPreviewWidget.js b/src/components/views/rooms/LinkPreviewWidget.js index 2e3a3915d0..1f1792f5d0 100644 --- a/src/components/views/rooms/LinkPreviewWidget.js +++ b/src/components/views/rooms/LinkPreviewWidget.js @@ -19,9 +19,9 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import { linkifyElement } from '../../../HtmlUtils'; import SettingsStore from "../../../settings/SettingsStore"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; const sdk = require('../../../index'); -const MatrixClientPeg = require('../../../MatrixClientPeg'); const ImageUtils = require('../../../ImageUtils'); const Modal = require('../../../Modal'); diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index f2656dddc5..f2e85369c4 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -47,7 +47,7 @@ import MultiInviter from "../../../utils/MultiInviter"; import SettingsStore from "../../../settings/SettingsStore"; import E2EIcon from "./E2EIcon"; import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {EventTimeline} from "matrix-js-sdk"; module.exports = createReactClass({ diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index 05464b43c9..eecfd6cf96 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -24,7 +24,7 @@ import dis from '../../../dispatcher'; import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; import {isValid3pidInvite} from "../../../RoomInvite"; import rate_limited_func from "../../../ratelimitedfunc"; -const MatrixClientPeg = require("../../../MatrixClientPeg"); +import {MatrixClientPeg} from "../../../MatrixClientPeg"; const sdk = require('../../../index'); const CallHandler = require("../../../CallHandler"); diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index ae346cbc70..8a92175f77 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -18,7 +18,7 @@ import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; import CallHandler from '../../../CallHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import RoomViewStore from '../../../stores/RoomViewStore'; diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index c58fe677f5..5767309cc0 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -30,7 +30,7 @@ import PlainWithPillsSerializer from "../../../autocomplete/PlainWithPillsSerial import classNames from 'classnames'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import type {MatrixClient} from 'matrix-js-sdk/src/matrix'; import {processCommandInput} from '../../../SlashCommands'; import { KeyCode, isOnlyCtrlOrCmdKeyEvent } from '../../../Keyboard'; diff --git a/src/components/views/rooms/PinnedEventTile.js b/src/components/views/rooms/PinnedEventTile.js index 1279c01049..d2715c3e63 100644 --- a/src/components/views/rooms/PinnedEventTile.js +++ b/src/components/views/rooms/PinnedEventTile.js @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import dis from "../../../dispatcher"; import AccessibleButton from "../elements/AccessibleButton"; import MessageEvent from "../messages/MessageEvent"; diff --git a/src/components/views/rooms/PinnedEventsPanel.js b/src/components/views/rooms/PinnedEventsPanel.js index dd2febdf39..e06e8f95a0 100644 --- a/src/components/views/rooms/PinnedEventsPanel.js +++ b/src/components/views/rooms/PinnedEventsPanel.js @@ -17,7 +17,7 @@ limitations under the License. import React from "react"; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import AccessibleButton from "../elements/AccessibleButton"; import PinnedEventTile from "./PinnedEventTile"; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/rooms/RoomBreadcrumbs.js b/src/components/views/rooms/RoomBreadcrumbs.js index 7611ff58ee..5a15a7518b 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.js +++ b/src/components/views/rooms/RoomBreadcrumbs.js @@ -16,7 +16,7 @@ limitations under the License. import React, {createRef} from "react"; import dis from "../../../dispatcher"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; import AccessibleButton from '../elements/AccessibleButton'; import RoomAvatar from '../avatars/RoomAvatar'; diff --git a/src/components/views/rooms/RoomDetailRow.js b/src/components/views/rooms/RoomDetailRow.js index b3a8b68b0d..66ec733061 100644 --- a/src/components/views/rooms/RoomDetailRow.js +++ b/src/components/views/rooms/RoomDetailRow.js @@ -19,7 +19,7 @@ import React, {createRef} from 'react'; import { _t } from '../../../languageHandler'; import { linkifyElement } from '../../../HtmlUtils'; import { ContentRepo } from 'matrix-js-sdk'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index 9b15cffcf5..4c1452a29c 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -20,7 +20,7 @@ import createReactClass from 'create-react-class'; import classNames from 'classnames'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import Modal from "../../../Modal"; import RateLimitedFunc from '../../../ratelimitedfunc'; diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 210c9394dc..a9b3849e79 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -23,7 +23,7 @@ import ReactDOM from "react-dom"; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; -const MatrixClientPeg = require("../../../MatrixClientPeg"); +import {MatrixClientPeg} from "../../../MatrixClientPeg"; const CallHandler = require('../../../CallHandler'); const dis = require("../../../dispatcher"); const sdk = require('../../../index'); diff --git a/src/components/views/rooms/RoomNameEditor.js b/src/components/views/rooms/RoomNameEditor.js index 375a4b42b1..94e7e3172b 100644 --- a/src/components/views/rooms/RoomNameEditor.js +++ b/src/components/views/rooms/RoomNameEditor.js @@ -17,8 +17,8 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; const sdk = require('../../../index'); -const MatrixClientPeg = require('../../../MatrixClientPeg'); import { _t } from '../../../languageHandler'; module.exports = createReactClass({ diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index 80b552ea24..04139aa93d 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -20,7 +20,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import classNames from 'classnames'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/rooms/RoomRecoveryReminder.js b/src/components/views/rooms/RoomRecoveryReminder.js index b45dd3a32c..534d198611 100644 --- a/src/components/views/rooms/RoomRecoveryReminder.js +++ b/src/components/views/rooms/RoomRecoveryReminder.js @@ -19,7 +19,7 @@ import PropTypes from "prop-types"; import * as sdk from "../../../index"; import { _t } from "../../../languageHandler"; import Modal from "../../../Modal"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore"; export default class RoomRecoveryReminder extends React.PureComponent { diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 0b8aae9d06..10ed397727 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -22,7 +22,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import classNames from 'classnames'; import dis from '../../../dispatcher'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import DMRoomMap from '../../../utils/DMRoomMap'; import * as sdk from '../../../index'; import {ContextMenu, ContextMenuButton, toRightOf} from '../../structures/ContextMenu'; diff --git a/src/components/views/rooms/RoomUpgradeWarningBar.js b/src/components/views/rooms/RoomUpgradeWarningBar.js index f7e167b253..dae5dbfa43 100644 --- a/src/components/views/rooms/RoomUpgradeWarningBar.js +++ b/src/components/views/rooms/RoomUpgradeWarningBar.js @@ -21,7 +21,7 @@ import * as sdk from '../../../index'; import Modal from '../../../Modal'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; module.exports = createReactClass({ displayName: 'RoomUpgradeWarningBar', diff --git a/src/components/views/rooms/SlateMessageComposer.js b/src/components/views/rooms/SlateMessageComposer.js index 7714676565..b1f7adbe32 100644 --- a/src/components/views/rooms/SlateMessageComposer.js +++ b/src/components/views/rooms/SlateMessageComposer.js @@ -18,7 +18,7 @@ import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import { _t, _td } from '../../../languageHandler'; import CallHandler from '../../../CallHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import RoomViewStore from '../../../stores/RoomViewStore'; diff --git a/src/components/views/rooms/Stickerpicker.js b/src/components/views/rooms/Stickerpicker.js index f1f1113836..67ee0d183c 100644 --- a/src/components/views/rooms/Stickerpicker.js +++ b/src/components/views/rooms/Stickerpicker.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import {_t, _td} from '../../../languageHandler'; import AppTile from '../elements/AppTile'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import * as sdk from '../../../index'; import dis from '../../../dispatcher'; import AccessibleButton from '../elements/AccessibleButton'; diff --git a/src/components/views/rooms/ThirdPartyMemberInfo.js b/src/components/views/rooms/ThirdPartyMemberInfo.js index 991b20f583..f8d9069ca6 100644 --- a/src/components/views/rooms/ThirdPartyMemberInfo.js +++ b/src/components/views/rooms/ThirdPartyMemberInfo.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {MatrixEvent} from "matrix-js-sdk"; import {_t} from "../../../languageHandler"; import dis from "../../../dispatcher"; diff --git a/src/components/views/rooms/WhoIsTypingTile.js b/src/components/views/rooms/WhoIsTypingTile.js index 03cc899977..439ed67e40 100644 --- a/src/components/views/rooms/WhoIsTypingTile.js +++ b/src/components/views/rooms/WhoIsTypingTile.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import * as WhoIsTyping from '../../../WhoIsTyping'; import Timer from '../../../utils/Timer'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import MemberAvatar from '../avatars/MemberAvatar'; module.exports = createReactClass({ diff --git a/src/components/views/settings/ChangeAvatar.js b/src/components/views/settings/ChangeAvatar.js index 03147bc06c..7d088d9a40 100644 --- a/src/components/views/settings/ChangeAvatar.js +++ b/src/components/views/settings/ChangeAvatar.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/settings/ChangeDisplayName.js b/src/components/views/settings/ChangeDisplayName.js index 946fe606e5..846fac6a6c 100644 --- a/src/components/views/settings/ChangeDisplayName.js +++ b/src/components/views/settings/ChangeDisplayName.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; module.exports = createReactClass({ diff --git a/src/components/views/settings/ChangePassword.js b/src/components/views/settings/ChangePassword.js index a317c46cec..37a8b1a1dc 100644 --- a/src/components/views/settings/ChangePassword.js +++ b/src/components/views/settings/ChangePassword.js @@ -20,7 +20,7 @@ import Field from "../elements/Field"; import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -const MatrixClientPeg = require("../../../MatrixClientPeg"); +import {MatrixClientPeg} from "../../../MatrixClientPeg"; const Modal = require("../../../Modal"); const sdk = require("../../../index"); diff --git a/src/components/views/settings/CrossSigningPanel.js b/src/components/views/settings/CrossSigningPanel.js index 5c7f7a21fe..2b191454f6 100644 --- a/src/components/views/settings/CrossSigningPanel.js +++ b/src/components/views/settings/CrossSigningPanel.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import * as sdk from '../../../index'; import { accessSecretStorage } from '../../../CrossSigningManager'; diff --git a/src/components/views/settings/DevicesPanel.js b/src/components/views/settings/DevicesPanel.js index 2da0a969af..8b76b26cb9 100644 --- a/src/components/views/settings/DevicesPanel.js +++ b/src/components/views/settings/DevicesPanel.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; diff --git a/src/components/views/settings/DevicesPanelEntry.js b/src/components/views/settings/DevicesPanelEntry.js index 8702f1e553..9ebce281ef 100644 --- a/src/components/views/settings/DevicesPanelEntry.js +++ b/src/components/views/settings/DevicesPanelEntry.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import {formatDate} from '../../../DateUtils'; export default class DevicesPanelEntry extends React.Component { diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index 3eb9d5ac72..9e55ad3f06 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import SettingsStore from '../../../../src/settings/SettingsStore'; diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 15899c850c..f3448f7bb5 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -18,7 +18,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import SettingsStore, {SettingLevel} from '../../../settings/SettingsStore'; import Modal from '../../../Modal'; import { diff --git a/src/components/views/settings/ProfileSettings.js b/src/components/views/settings/ProfileSettings.js index a878a8cc3f..7f7d2c8e8c 100644 --- a/src/components/views/settings/ProfileSettings.js +++ b/src/components/views/settings/ProfileSettings.js @@ -16,7 +16,7 @@ limitations under the License. import React, {createRef} from 'react'; import {_t} from "../../../languageHandler"; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import Field from "../elements/Field"; import AccessibleButton from "../elements/AccessibleButton"; import classNames from 'classnames'; diff --git a/src/components/views/settings/SetIdServer.js b/src/components/views/settings/SetIdServer.js index 64a5ce751c..995959dc90 100644 --- a/src/components/views/settings/SetIdServer.js +++ b/src/components/views/settings/SetIdServer.js @@ -19,7 +19,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; import * as sdk from '../../../index'; -import MatrixClientPeg from "../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; import Modal from '../../../Modal'; import dis from "../../../dispatcher"; import { getThreepidsWithBindStatus } from '../../../boundThreepids'; diff --git a/src/components/views/settings/account/EmailAddresses.js b/src/components/views/settings/account/EmailAddresses.js index b41fe13805..5c7f9b24d3 100644 --- a/src/components/views/settings/account/EmailAddresses.js +++ b/src/components/views/settings/account/EmailAddresses.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../languageHandler"; -import MatrixClientPeg from "../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../MatrixClientPeg"; import Field from "../../elements/Field"; import AccessibleButton from "../../elements/AccessibleButton"; import * as Email from "../../../../email"; diff --git a/src/components/views/settings/account/PhoneNumbers.js b/src/components/views/settings/account/PhoneNumbers.js index 57aa5781b1..a59fd60eca 100644 --- a/src/components/views/settings/account/PhoneNumbers.js +++ b/src/components/views/settings/account/PhoneNumbers.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../languageHandler"; -import MatrixClientPeg from "../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../MatrixClientPeg"; import Field from "../../elements/Field"; import AccessibleButton from "../../elements/AccessibleButton"; import AddThreepid from "../../../../AddThreepid"; diff --git a/src/components/views/settings/discovery/EmailAddresses.js b/src/components/views/settings/discovery/EmailAddresses.js index 567d2b4374..afc538bd33 100644 --- a/src/components/views/settings/discovery/EmailAddresses.js +++ b/src/components/views/settings/discovery/EmailAddresses.js @@ -19,7 +19,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { _t } from "../../../../languageHandler"; -import MatrixClientPeg from "../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../MatrixClientPeg"; import * as sdk from '../../../../index'; import Modal from '../../../../Modal'; import AddThreepid from '../../../../AddThreepid'; diff --git a/src/components/views/settings/discovery/PhoneNumbers.js b/src/components/views/settings/discovery/PhoneNumbers.js index 84ad7d61e7..17fc99458f 100644 --- a/src/components/views/settings/discovery/PhoneNumbers.js +++ b/src/components/views/settings/discovery/PhoneNumbers.js @@ -19,7 +19,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { _t } from "../../../../languageHandler"; -import MatrixClientPeg from "../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../MatrixClientPeg"; import * as sdk from '../../../../index'; import Modal from '../../../../Modal'; import AddThreepid from '../../../../AddThreepid'; diff --git a/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.js b/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.js index 4fa3fb8649..6be868dc40 100644 --- a/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/AdvancedRoomSettingsTab.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../../languageHandler"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import * as sdk from "../../../../.."; import AccessibleButton from "../../../elements/AccessibleButton"; import Modal from "../../../../../Modal"; diff --git a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js index 4423ef9ecb..f0ebd2d7fd 100644 --- a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../../languageHandler"; import RoomProfileSettings from "../../../room_settings/RoomProfileSettings"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import * as sdk from "../../../../.."; import AccessibleButton from "../../../elements/AccessibleButton"; import {MatrixClient} from "matrix-js-sdk"; diff --git a/src/components/views/settings/tabs/room/NotificationSettingsTab.js b/src/components/views/settings/tabs/room/NotificationSettingsTab.js index 448963dacf..9db27651c0 100644 --- a/src/components/views/settings/tabs/room/NotificationSettingsTab.js +++ b/src/components/views/settings/tabs/room/NotificationSettingsTab.js @@ -17,7 +17,7 @@ limitations under the License. import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../../languageHandler"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import AccessibleButton from "../../../elements/AccessibleButton"; import Notifier from "../../../../../Notifier"; import SettingsStore from '../../../../../settings/SettingsStore'; diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.js b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.js index 0c53a13e96..42947d1fb2 100644 --- a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t, _td} from "../../../../../languageHandler"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import * as sdk from "../../../../.."; import AccessibleButton from "../../../elements/AccessibleButton"; import Modal from "../../../../../Modal"; diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js index 6dea081d96..0c66503c43 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../../languageHandler"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import * as sdk from "../../../../.."; import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch"; import {SettingLevel} from "../../../../../settings/SettingsStore"; diff --git a/src/components/views/settings/tabs/user/FlairUserSettingsTab.js b/src/components/views/settings/tabs/user/FlairUserSettingsTab.js index 0063a9a981..b5f3849729 100644 --- a/src/components/views/settings/tabs/user/FlairUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/FlairUserSettingsTab.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import {_t} from "../../../../../languageHandler"; import GroupUserSettings from "../../../groups/GroupUserSettings"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import PropTypes from "prop-types"; import {MatrixClient} from "matrix-js-sdk"; diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js index d4182a51d3..908968b051 100644 --- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js @@ -29,7 +29,7 @@ import DeactivateAccountDialog from "../../../dialogs/DeactivateAccountDialog"; import PropTypes from "prop-types"; import {enumerateThemes, ThemeWatcher} from "../../../../../theme"; import PlatformPeg from "../../../../../PlatformPeg"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import * as sdk from "../../../../.."; import Modal from "../../../../../Modal"; import dis from "../../../../../dispatcher"; diff --git a/src/components/views/settings/tabs/user/HelpUserSettingsTab.js b/src/components/views/settings/tabs/user/HelpUserSettingsTab.js index 875f0bfc10..0cf67a4db7 100644 --- a/src/components/views/settings/tabs/user/HelpUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/HelpUserSettingsTab.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import {_t, getCurrentLanguage} from "../../../../../languageHandler"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import AccessibleButton from "../../../elements/AccessibleButton"; import SdkConfig from "../../../../../SdkConfig"; import createRoom from "../../../../../createRoom"; diff --git a/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.js b/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.js index 608be0b129..575221c780 100644 --- a/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.js @@ -20,7 +20,7 @@ import {Mjolnir} from "../../../../../mjolnir/Mjolnir"; import {ListRule} from "../../../../../mjolnir/ListRule"; import {BanList, RULE_SERVER, RULE_USER} from "../../../../../mjolnir/BanList"; import Modal from "../../../../../Modal"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; const sdk = require("../../../../.."); diff --git a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js index 8d0ec5bd69..e816a03e90 100644 --- a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {_t} from "../../../../../languageHandler"; import SettingsStore, {SettingLevel} from "../../../../../settings/SettingsStore"; -import MatrixClientPeg from "../../../../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; import * as FormattingUtils from "../../../../../utils/FormattingUtils"; import AccessibleButton from "../../../elements/AccessibleButton"; import Analytics from "../../../../../Analytics"; diff --git a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js index 18ea5a82be..d0119ecbbf 100644 --- a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js @@ -20,9 +20,9 @@ import CallMediaHandler from "../../../../../CallMediaHandler"; import Field from "../../../elements/Field"; import AccessibleButton from "../../../elements/AccessibleButton"; import {SettingLevel} from "../../../../../settings/SettingsStore"; +import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; const Modal = require("../../../../../Modal"); const sdk = require("../../../../.."); -const MatrixClientPeg = require("../../../../../MatrixClientPeg"); export default class VoiceUserSettingsTab extends React.Component { constructor() { diff --git a/src/components/views/toasts/VerificationRequestToast.js b/src/components/views/toasts/VerificationRequestToast.js index abc79c38d0..f6923025d7 100644 --- a/src/components/views/toasts/VerificationRequestToast.js +++ b/src/components/views/toasts/VerificationRequestToast.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import * as sdk from "../../../index"; import { _t } from '../../../languageHandler'; import Modal from "../../../Modal"; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import {verificationMethods} from 'matrix-js-sdk/src/crypto'; import KeyVerificationStateObserver, {userLabelForEventRoom} from "../../../utils/KeyVerificationStateObserver"; import dis from "../../../dispatcher"; diff --git a/src/components/views/voip/CallView.js b/src/components/views/voip/CallView.js index e76fbf397f..5b3b198472 100644 --- a/src/components/views/voip/CallView.js +++ b/src/components/views/voip/CallView.js @@ -19,7 +19,7 @@ import createReactClass from 'create-react-class'; import dis from '../../../dispatcher'; import CallHandler from '../../../CallHandler'; import * as sdk from '../../../index'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from '../../../languageHandler'; module.exports = createReactClass({ diff --git a/src/components/views/voip/IncomingCallBox.js b/src/components/views/voip/IncomingCallBox.js index a7ad7bfdf6..4304cac912 100644 --- a/src/components/views/voip/IncomingCallBox.js +++ b/src/components/views/voip/IncomingCallBox.js @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -import MatrixClientPeg from '../../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; import * as sdk from '../../../index'; diff --git a/src/createRoom.js b/src/createRoom.js index e0c4922f48..ac943663ff 100644 --- a/src/createRoom.js +++ b/src/createRoom.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from './MatrixClientPeg'; +import {MatrixClientPeg} from './MatrixClientPeg'; import Modal from './Modal'; import * as sdk from './index'; import { _t } from './languageHandler'; diff --git a/src/indexing/EventIndex.js b/src/indexing/EventIndex.js index cf7e2d8da2..c912e31fa5 100644 --- a/src/indexing/EventIndex.js +++ b/src/indexing/EventIndex.js @@ -15,7 +15,7 @@ limitations under the License. */ import PlatformPeg from "../PlatformPeg"; -import MatrixClientPeg from "../MatrixClientPeg"; +import {MatrixClientPeg} from "../MatrixClientPeg"; /* * Event indexing class that wraps the platform specific event indexing. diff --git a/src/integrations/IntegrationManagers.js b/src/integrations/IntegrationManagers.js index 8400b3dc94..b482ec73ce 100644 --- a/src/integrations/IntegrationManagers.js +++ b/src/integrations/IntegrationManagers.js @@ -20,7 +20,7 @@ import Modal from '../Modal'; import {IntegrationManagerInstance, KIND_ACCOUNT, KIND_CONFIG, KIND_HOMESERVER} from "./IntegrationManagerInstance"; import type {MatrixClient, MatrixEvent, Room} from "matrix-js-sdk"; import WidgetUtils from "../utils/WidgetUtils"; -import MatrixClientPeg from "../MatrixClientPeg"; +import {MatrixClientPeg} from "../MatrixClientPeg"; import {AutoDiscovery} from "matrix-js-sdk"; import SettingsStore from "../settings/SettingsStore"; diff --git a/src/mjolnir/BanList.js b/src/mjolnir/BanList.js index 60a924a52b..21cd5d4cf7 100644 --- a/src/mjolnir/BanList.js +++ b/src/mjolnir/BanList.js @@ -17,7 +17,7 @@ limitations under the License. // Inspiration largely taken from Mjolnir itself import {ListRule, RECOMMENDATION_BAN, recommendationToStable} from "./ListRule"; -import MatrixClientPeg from "../MatrixClientPeg"; +import {MatrixClientPeg} from "../MatrixClientPeg"; export const RULE_USER = "m.room.rule.user"; export const RULE_ROOM = "m.room.rule.room"; diff --git a/src/mjolnir/Mjolnir.js b/src/mjolnir/Mjolnir.js index 7539dfafb0..4970d8e8af 100644 --- a/src/mjolnir/Mjolnir.js +++ b/src/mjolnir/Mjolnir.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from "../MatrixClientPeg"; +import {MatrixClientPeg} from "../MatrixClientPeg"; import {ALL_RULE_TYPES, BanList} from "./BanList"; import SettingsStore, {SettingLevel} from "../settings/SettingsStore"; import {_t} from "../languageHandler"; diff --git a/src/rageshake/submit-rageshake.js b/src/rageshake/submit-rageshake.js index 457958eb82..019da10d52 100644 --- a/src/rageshake/submit-rageshake.js +++ b/src/rageshake/submit-rageshake.js @@ -18,7 +18,7 @@ limitations under the License. import pako from 'pako'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import PlatformPeg from '../PlatformPeg'; import { _t } from '../languageHandler'; diff --git a/src/settings/controllers/NotificationControllers.js b/src/settings/controllers/NotificationControllers.js index 37d318eb1d..ada4155206 100644 --- a/src/settings/controllers/NotificationControllers.js +++ b/src/settings/controllers/NotificationControllers.js @@ -15,7 +15,7 @@ limitations under the License. */ import SettingController from "./SettingController"; -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; // XXX: This feels wrong. import {PushProcessor} from "matrix-js-sdk/src/pushprocessor"; diff --git a/src/settings/handlers/AccountSettingsHandler.js b/src/settings/handlers/AccountSettingsHandler.js index 7b05ad0c1b..fea2e92c62 100644 --- a/src/settings/handlers/AccountSettingsHandler.js +++ b/src/settings/handlers/AccountSettingsHandler.js @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; import {SettingLevel} from "../SettingsStore"; diff --git a/src/settings/handlers/DeviceSettingsHandler.js b/src/settings/handlers/DeviceSettingsHandler.js index ed61e9f3be..44f89b9086 100644 --- a/src/settings/handlers/DeviceSettingsHandler.js +++ b/src/settings/handlers/DeviceSettingsHandler.js @@ -17,7 +17,7 @@ limitations under the License. */ import SettingsHandler from "./SettingsHandler"; -import MatrixClientPeg from "../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../MatrixClientPeg"; import {SettingLevel} from "../SettingsStore"; /** diff --git a/src/settings/handlers/RoomAccountSettingsHandler.js b/src/settings/handlers/RoomAccountSettingsHandler.js index 0206711db2..1e9d3f7bed 100644 --- a/src/settings/handlers/RoomAccountSettingsHandler.js +++ b/src/settings/handlers/RoomAccountSettingsHandler.js @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; import {SettingLevel} from "../SettingsStore"; diff --git a/src/settings/handlers/RoomSettingsHandler.js b/src/settings/handlers/RoomSettingsHandler.js index 79626e2186..6407818450 100644 --- a/src/settings/handlers/RoomSettingsHandler.js +++ b/src/settings/handlers/RoomSettingsHandler.js @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from '../../MatrixClientPeg'; +import {MatrixClientPeg} from '../../MatrixClientPeg'; import MatrixClientBackedSettingsHandler from "./MatrixClientBackedSettingsHandler"; import {SettingLevel} from "../SettingsStore"; diff --git a/src/stores/ActiveWidgetStore.js b/src/stores/ActiveWidgetStore.js index 82a7f7932c..60ea3f9106 100644 --- a/src/stores/ActiveWidgetStore.js +++ b/src/stores/ActiveWidgetStore.js @@ -16,7 +16,7 @@ limitations under the License. import EventEmitter from 'events'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; /** * Stores information about the widgets active in the app right now: diff --git a/src/stores/GroupStore.js b/src/stores/GroupStore.js index 637e87b728..f691a33e6f 100644 --- a/src/stores/GroupStore.js +++ b/src/stores/GroupStore.js @@ -17,7 +17,7 @@ limitations under the License. import EventEmitter from 'events'; import { groupMemberFromApiObject, groupRoomFromApiObject } from '../groups'; import FlairStore from './FlairStore'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; function parseMembersResponse(response) { return response.chunk.map((apiMember) => groupMemberFromApiObject(apiMember)); diff --git a/src/stores/RoomViewStore.js b/src/stores/RoomViewStore.js index 8b25eba356..a96174234a 100644 --- a/src/stores/RoomViewStore.js +++ b/src/stores/RoomViewStore.js @@ -16,7 +16,7 @@ limitations under the License. */ import dis from '../dispatcher'; import {Store} from 'flux/utils'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import * as sdk from '../index'; import Modal from '../Modal'; import { _t } from '../languageHandler'; diff --git a/src/stores/TagOrderStore.js b/src/stores/TagOrderStore.js index 48a8817270..3ca9e39560 100644 --- a/src/stores/TagOrderStore.js +++ b/src/stores/TagOrderStore.js @@ -18,7 +18,7 @@ import dis from '../dispatcher'; import GroupStore from './GroupStore'; import Analytics from '../Analytics'; import * as RoomNotifs from "../RoomNotifs"; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; const INITIAL_STATE = { orderedTags: null, diff --git a/src/stores/TypingStore.js b/src/stores/TypingStore.js index 71ae4f55a3..e86d698eac 100644 --- a/src/stores/TypingStore.js +++ b/src/stores/TypingStore.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from "../MatrixClientPeg"; +import {MatrixClientPeg} from "../MatrixClientPeg"; import SettingsStore from "../settings/SettingsStore"; import Timer from "../utils/Timer"; diff --git a/src/utils/DMRoomMap.js b/src/utils/DMRoomMap.js index af65b6f001..de6d42e4a2 100644 --- a/src/utils/DMRoomMap.js +++ b/src/utils/DMRoomMap.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import _uniq from 'lodash/uniq'; /** diff --git a/src/utils/DecryptFile.js b/src/utils/DecryptFile.js index f193bd7709..b87b723ed7 100644 --- a/src/utils/DecryptFile.js +++ b/src/utils/DecryptFile.js @@ -20,7 +20,7 @@ import encrypt from 'browser-encrypt-attachment'; // Pull in a fetch polyfill so we can download encrypted attachments. import 'isomorphic-fetch'; // Grab the client so that we can turn mxc:// URLs into https:// URLS. -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; // WARNING: We have to be very careful about what mime-types we allow into blobs, // as for performance reasons these are now rendered via URL.createObjectURL() diff --git a/src/utils/EventUtils.js b/src/utils/EventUtils.js index 29af5ca9b5..8acf5ae396 100644 --- a/src/utils/EventUtils.js +++ b/src/utils/EventUtils.js @@ -15,7 +15,7 @@ limitations under the License. */ import { EventStatus } from 'matrix-js-sdk'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import shouldHideEvent from "../shouldHideEvent"; /** * Returns whether an event should allow actions like reply, reactions, edit, etc. diff --git a/src/utils/HostingLink.js b/src/utils/HostingLink.js index ff1ac3d063..580ed00de5 100644 --- a/src/utils/HostingLink.js +++ b/src/utils/HostingLink.js @@ -18,7 +18,7 @@ import url from 'url'; import qs from 'qs'; import SdkConfig from '../SdkConfig'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; export function getHostingLink(campaign) { const hostingLink = SdkConfig.get().hosting_signup_link; diff --git a/src/utils/IdentityServerUtils.js b/src/utils/IdentityServerUtils.js index cf180e3026..093d4eeabf 100644 --- a/src/utils/IdentityServerUtils.js +++ b/src/utils/IdentityServerUtils.js @@ -16,7 +16,7 @@ limitations under the License. import { SERVICE_TYPES } from 'matrix-js-sdk'; import SdkConfig from '../SdkConfig'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; export function getDefaultIdentityServerUrl() { return SdkConfig.get()['validated_server_config']['isUrl']; diff --git a/src/utils/KeyVerificationStateObserver.js b/src/utils/KeyVerificationStateObserver.js index 2f7c0367ad..d84a5f584e 100644 --- a/src/utils/KeyVerificationStateObserver.js +++ b/src/utils/KeyVerificationStateObserver.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import { _t } from '../languageHandler'; const SUB_EVENT_TYPES_OF_INTEREST = ["start", "cancel", "done"]; diff --git a/src/utils/MultiInviter.js b/src/utils/MultiInviter.js index 2ea1da5bcc..7d1c900360 100644 --- a/src/utils/MultiInviter.js +++ b/src/utils/MultiInviter.js @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import {getAddressType} from '../UserAddress'; import GroupStore from '../stores/GroupStore'; import {_t} from "../languageHandler"; diff --git a/src/utils/PasswordScorer.js b/src/utils/PasswordScorer.js index 3c366a73f8..9d89942bf5 100644 --- a/src/utils/PasswordScorer.js +++ b/src/utils/PasswordScorer.js @@ -16,7 +16,7 @@ limitations under the License. import zxcvbn from 'zxcvbn'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import { _t, _td } from '../languageHandler'; const ZXCVBN_USER_INPUTS = [ diff --git a/src/utils/WidgetUtils.js b/src/utils/WidgetUtils.js index 9bab78dee4..c09cd8a858 100644 --- a/src/utils/WidgetUtils.js +++ b/src/utils/WidgetUtils.js @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import SdkConfig from "../SdkConfig"; import dis from '../dispatcher'; import * as url from "url"; diff --git a/src/utils/permalinks/Permalinks.js b/src/utils/permalinks/Permalinks.js index 4b97d1664f..591cdbb576 100644 --- a/src/utils/permalinks/Permalinks.js +++ b/src/utils/permalinks/Permalinks.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import MatrixClientPeg from "../../MatrixClientPeg"; +import {MatrixClientPeg} from "../../MatrixClientPeg"; import isIp from "is-ip"; import * as utils from 'matrix-js-sdk/src/utils'; import SpecPermalinkConstructor, {baseUrl as matrixtoBaseUrl} from "./SpecPermalinkConstructor"; diff --git a/src/utils/pillify.js b/src/utils/pillify.js index 044b04181e..8c2eda5f71 100644 --- a/src/utils/pillify.js +++ b/src/utils/pillify.js @@ -15,7 +15,7 @@ limitations under the License. */ import ReactDOM from 'react-dom'; -import MatrixClientPeg from '../MatrixClientPeg'; +import {MatrixClientPeg} from '../MatrixClientPeg'; import SettingsStore from "../settings/SettingsStore"; import {PushProcessor} from 'matrix-js-sdk/src/pushprocessor'; import * as sdk from '../index'; diff --git a/test/ScalarAuthClient-test.js b/test/ScalarAuthClient-test.js index 7e944189a6..a3a95c7053 100644 --- a/test/ScalarAuthClient-test.js +++ b/test/ScalarAuthClient-test.js @@ -19,7 +19,7 @@ import expect from 'expect'; import sinon from 'sinon'; import ScalarAuthClient from '../src/ScalarAuthClient'; -import MatrixClientPeg from '../src/MatrixClientPeg'; +import {MatrixClientPeg} from '../src/MatrixClientPeg'; import { stubClient } from './test-utils'; describe('ScalarAuthClient', function() { diff --git a/test/Terms-test.js b/test/Terms-test.js index 3fc7b56e42..6b102a5eda 100644 --- a/test/Terms-test.js +++ b/test/Terms-test.js @@ -22,7 +22,7 @@ import * as Matrix from 'matrix-js-sdk'; import { startTermsFlow, Service } from '../src/Terms'; import { stubClient } from './test-utils'; -import MatrixClientPeg from '../src/MatrixClientPeg'; +import {MatrixClientPeg} from '../src/MatrixClientPeg'; const POLICY_ONE = { version: "six", diff --git a/test/components/structures/GroupView-test.js b/test/components/structures/GroupView-test.js index b0768d3911..45b524c4ed 100644 --- a/test/components/structures/GroupView-test.js +++ b/test/components/structures/GroupView-test.js @@ -20,7 +20,7 @@ import ReactTestUtils from 'react-dom/test-utils'; import expect from 'expect'; import MockHttpBackend from 'matrix-mock-request'; -import MatrixClientPeg from '../../../src/MatrixClientPeg'; +import {MatrixClientPeg} from '../../../src/MatrixClientPeg'; import sdk from 'matrix-react-sdk'; import Matrix from 'matrix-js-sdk'; diff --git a/test/components/structures/MessagePanel-test.js b/test/components/structures/MessagePanel-test.js index 7c52512bc2..60a392047b 100644 --- a/test/components/structures/MessagePanel-test.js +++ b/test/components/structures/MessagePanel-test.js @@ -29,7 +29,7 @@ import { EventEmitter } from "events"; const sdk = require('matrix-react-sdk'); const MessagePanel = sdk.getComponent('structures.MessagePanel'); -import MatrixClientPeg from '../../../src/MatrixClientPeg'; +import {MatrixClientPeg} from '../../../src/MatrixClientPeg'; import Matrix from 'matrix-js-sdk'; const test_utils = require('test-utils'); diff --git a/test/components/views/dialogs/InteractiveAuthDialog-test.js b/test/components/views/dialogs/InteractiveAuthDialog-test.js index 5f90e0f21c..850e4e94d5 100644 --- a/test/components/views/dialogs/InteractiveAuthDialog-test.js +++ b/test/components/views/dialogs/InteractiveAuthDialog-test.js @@ -22,7 +22,7 @@ import sinon from 'sinon'; import MatrixReactTestUtils from 'matrix-react-test-utils'; import sdk from 'matrix-react-sdk'; -import MatrixClientPeg from '../../../../src/MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../src/MatrixClientPeg'; import * as test_utils from '../../../test-utils'; import {sleep} from "../../../../src/utils/promise"; diff --git a/test/components/views/groups/GroupMemberList-test.js b/test/components/views/groups/GroupMemberList-test.js index 3922610644..32bf25f570 100644 --- a/test/components/views/groups/GroupMemberList-test.js +++ b/test/components/views/groups/GroupMemberList-test.js @@ -20,7 +20,7 @@ import ReactTestUtils from "react-dom/test-utils"; import expect from "expect"; import MockHttpBackend from "matrix-mock-request"; -import MatrixClientPeg from "../../../../src/MatrixClientPeg"; +import {MatrixClientPeg} from "../../../../src/MatrixClientPeg"; import sdk from "matrix-react-sdk"; import Matrix from "matrix-js-sdk"; diff --git a/test/components/views/rooms/MemberList-test.js b/test/components/views/rooms/MemberList-test.js index 9a1439c2f7..635d0753fd 100644 --- a/test/components/views/rooms/MemberList-test.js +++ b/test/components/views/rooms/MemberList-test.js @@ -7,7 +7,7 @@ import lolex from 'lolex'; import * as TestUtils from 'test-utils'; import sdk from '../../../../src/index'; -import MatrixClientPeg from '../../../../src/MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../src/MatrixClientPeg'; import {Room, RoomMember, User} from 'matrix-js-sdk'; diff --git a/test/components/views/rooms/MessageComposerInput-test.js b/test/components/views/rooms/MessageComposerInput-test.js index 60380eecd2..6adae13181 100644 --- a/test/components/views/rooms/MessageComposerInput-test.js +++ b/test/components/views/rooms/MessageComposerInput-test.js @@ -6,7 +6,7 @@ import sinon from 'sinon'; import * as testUtils from '../../../test-utils'; import sdk from 'matrix-react-sdk'; const MessageComposerInput = sdk.getComponent('views.rooms.MessageComposerInput'); -import MatrixClientPeg from '../../../../src/MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../src/MatrixClientPeg'; import {sleep} from "../../../../src/utils/promise"; function addTextToDraft(text) { diff --git a/test/components/views/rooms/RoomList-test.js b/test/components/views/rooms/RoomList-test.js index 68168fcf29..0df968824d 100644 --- a/test/components/views/rooms/RoomList-test.js +++ b/test/components/views/rooms/RoomList-test.js @@ -7,7 +7,7 @@ import lolex from 'lolex'; import * as TestUtils from 'test-utils'; import sdk from '../../../../src/index'; -import MatrixClientPeg from '../../../../src/MatrixClientPeg'; +import {MatrixClientPeg} from '../../../../src/MatrixClientPeg'; import { DragDropContext } from 'react-beautiful-dnd'; import dis from '../../../../src/dispatcher'; diff --git a/test/components/views/rooms/RoomSettings-test.js b/test/components/views/rooms/RoomSettings-test.js index 1c0bfd95dc..b0ed832c6d 100644 --- a/test/components/views/rooms/RoomSettings-test.js +++ b/test/components/views/rooms/RoomSettings-test.js @@ -6,7 +6,7 @@ // import * as testUtils from '../../../test-utils'; // import sdk from 'matrix-react-sdk'; // const WrappedRoomSettings = testUtils.wrapInMatrixClientContext(sdk.getComponent('views.rooms.RoomSettings')); -// import MatrixClientPeg from '../../../../src/MatrixClientPeg'; +// import {MatrixClientPeg} from '../../../../src/MatrixClientPeg'; // import SettingsStore from '../../../../src/settings/SettingsStore'; // // From f1ac3d2f646007946d5a8ce440ec630833c6a5f6 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 20 Dec 2019 14:41:07 -0700 Subject: [PATCH 5/5] Convert imports to ES6 from CommonJS This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async) --- src/ScalarAuthClient.js | 2 +- src/Unread.js | 2 +- src/Velociraptor.js | 6 +++--- src/VelocityBounce.js | 2 +- src/actions/RoomListActions.js | 1 - .../views/dialogs/EncryptedEventDialog.js | 2 +- .../dialogs/keybackup/CreateKeyBackupDialog.js | 1 - src/autocomplete/CommunityProvider.js | 2 +- src/autocomplete/DuckDuckGoProvider.js | 2 +- src/autocomplete/NotifProvider.js | 2 +- src/autocomplete/RoomProvider.js | 2 +- src/autocomplete/UserProvider.js | 2 +- src/components/structures/InteractiveAuth.js | 4 +--- src/components/structures/MatrixChat.js | 2 +- src/components/structures/NotificationPanel.js | 3 +-- src/components/structures/RoomDirectory.js | 8 +++----- src/components/structures/TimelinePanel.js | 15 ++++++--------- src/components/structures/UploadBar.js | 4 ++-- src/components/views/avatars/MemberAvatar.js | 4 ++-- src/components/views/elements/ImageView.js | 8 ++++---- .../views/room_settings/AliasSettings.js | 6 +++--- src/components/views/rooms/EventTile.js | 9 +++------ src/components/views/rooms/LinkPreviewWidget.js | 7 +++---- src/components/views/rooms/MemberList.js | 4 ++-- src/components/views/rooms/MemberTile.js | 6 ++---- src/components/views/rooms/ReadReceiptMarker.js | 9 +++------ src/components/views/rooms/RoomList.js | 11 +++++------ src/components/views/rooms/RoomNameEditor.js | 2 +- src/components/views/rooms/SearchBar.js | 4 ++-- src/components/views/rooms/UserTile.js | 3 +-- src/components/views/settings/ChangePassword.js | 6 ++---- .../settings/tabs/user/LabsUserSettingsTab.js | 2 +- .../settings/tabs/user/MjolnirUserSettingsTab.js | 3 +-- .../tabs/user/NotificationUserSettingsTab.js | 2 +- .../settings/tabs/user/VoiceUserSettingsTab.js | 4 ++-- src/dispatcher.js | 2 +- src/utils/createMatrixClient.js | 2 +- src/utils/permalinks/Permalinks.js | 3 +-- 38 files changed, 67 insertions(+), 92 deletions(-) diff --git a/src/ScalarAuthClient.js b/src/ScalarAuthClient.js index 99d6c533a9..819fe3c998 100644 --- a/src/ScalarAuthClient.js +++ b/src/ScalarAuthClient.js @@ -19,7 +19,7 @@ import url from 'url'; import SettingsStore from "./settings/SettingsStore"; import { Service, startTermsFlow, TermsNotSignedError } from './Terms'; import {MatrixClientPeg} from "./MatrixClientPeg"; -const request = require('browser-request'); +import request from "browser-request"; import * as Matrix from 'matrix-js-sdk'; import SdkConfig from "./SdkConfig"; diff --git a/src/Unread.js b/src/Unread.js index 8b859a07fe..6aaa733f20 100644 --- a/src/Unread.js +++ b/src/Unread.js @@ -16,7 +16,7 @@ limitations under the License. import {MatrixClientPeg} from "./MatrixClientPeg"; import shouldHideEvent from './shouldHideEvent'; -const sdk = require('./index'); +import * as sdk from "./index"; module.exports = { /** diff --git a/src/Velociraptor.js b/src/Velociraptor.js index 245ca6648b..ce52f60dbd 100644 --- a/src/Velociraptor.js +++ b/src/Velociraptor.js @@ -1,7 +1,7 @@ -const React = require('react'); -const ReactDom = require('react-dom'); +import React from "react"; +import ReactDom from "react-dom"; +import Velocity from "velocity-animate"; import PropTypes from 'prop-types'; -const Velocity = require('velocity-animate'); /** * The Velociraptor contains components and animates transitions with velocity. diff --git a/src/VelocityBounce.js b/src/VelocityBounce.js index db216f81fb..ffbf7de829 100644 --- a/src/VelocityBounce.js +++ b/src/VelocityBounce.js @@ -1,4 +1,4 @@ -const Velocity = require('velocity-animate'); +import Velocity from "velocity-animate"; // courtesy of https://github.com/julianshapiro/velocity/issues/283 // We only use easeOutBounce (easeInBounce is just sort of nonsensical) diff --git a/src/actions/RoomListActions.js b/src/actions/RoomListActions.js index 854fa1b367..d534fe5d1d 100644 --- a/src/actions/RoomListActions.js +++ b/src/actions/RoomListActions.js @@ -16,7 +16,6 @@ limitations under the License. import { asyncAction } from './actionCreators'; import RoomListStore from '../stores/RoomListStore'; - import Modal from '../Modal'; import * as Rooms from '../Rooms'; import { _t } from '../languageHandler'; diff --git a/src/async-components/views/dialogs/EncryptedEventDialog.js b/src/async-components/views/dialogs/EncryptedEventDialog.js index 64c36962c4..45cc154906 100644 --- a/src/async-components/views/dialogs/EncryptedEventDialog.js +++ b/src/async-components/views/dialogs/EncryptedEventDialog.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -const React = require("react"); +import React from "react"; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; diff --git a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js index 56d3c80549..aec9162c97 100644 --- a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js +++ b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import FileSaver from 'file-saver'; - import * as sdk from '../../../../index'; import {MatrixClientPeg} from '../../../../MatrixClientPeg'; import { scorePassword } from '../../../../utils/PasswordScorer'; diff --git a/src/autocomplete/CommunityProvider.js b/src/autocomplete/CommunityProvider.js index e67c53b3f4..b863603aae 100644 --- a/src/autocomplete/CommunityProvider.js +++ b/src/autocomplete/CommunityProvider.js @@ -46,7 +46,7 @@ export default class CommunityProvider extends AutocompleteProvider { }); } - async getCompletions(query: string, selection: SelectionRange, force?: boolean = false): Array { + async getCompletions(query: string, selection: SelectionRange, force: boolean = false): Array { const BaseAvatar = sdk.getComponent('views.avatars.BaseAvatar'); // Disable autocompletions when composing commands because of various issues diff --git a/src/autocomplete/DuckDuckGoProvider.js b/src/autocomplete/DuckDuckGoProvider.js index 49ef7dfb43..ca1b1478cc 100644 --- a/src/autocomplete/DuckDuckGoProvider.js +++ b/src/autocomplete/DuckDuckGoProvider.js @@ -37,7 +37,7 @@ export default class DuckDuckGoProvider extends AutocompleteProvider { + `&format=json&no_redirect=1&no_html=1&t=${encodeURIComponent(REFERRER)}`; } - async getCompletions(query: string, selection: SelectionRange, force?: boolean = false) { + async getCompletions(query: string, selection: SelectionRange, force: boolean = false) { const {command, range} = this.getCurrentCommand(query, selection); if (!query || !command) { return []; diff --git a/src/autocomplete/NotifProvider.js b/src/autocomplete/NotifProvider.js index b433e91b05..e7c8f6f70d 100644 --- a/src/autocomplete/NotifProvider.js +++ b/src/autocomplete/NotifProvider.js @@ -30,7 +30,7 @@ export default class NotifProvider extends AutocompleteProvider { this.room = room; } - async getCompletions(query: string, selection: SelectionRange, force?:boolean = false): Array { + async getCompletions(query: string, selection: SelectionRange, force:boolean = false): Array { const RoomAvatar = sdk.getComponent('views.avatars.RoomAvatar'); const client = MatrixClientPeg.get(); diff --git a/src/autocomplete/RoomProvider.js b/src/autocomplete/RoomProvider.js index bb7f8ae0c9..b28c79ac54 100644 --- a/src/autocomplete/RoomProvider.js +++ b/src/autocomplete/RoomProvider.js @@ -48,7 +48,7 @@ export default class RoomProvider extends AutocompleteProvider { }); } - async getCompletions(query: string, selection: SelectionRange, force?: boolean = false): Array { + async getCompletions(query: string, selection: SelectionRange, force: boolean = false): Array { const RoomAvatar = sdk.getComponent('views.avatars.RoomAvatar'); const client = MatrixClientPeg.get(); diff --git a/src/autocomplete/UserProvider.js b/src/autocomplete/UserProvider.js index 59075b0752..7fd600b136 100644 --- a/src/autocomplete/UserProvider.js +++ b/src/autocomplete/UserProvider.js @@ -91,7 +91,7 @@ export default class UserProvider extends AutocompleteProvider { this.users = null; } - async getCompletions(query: string, selection: SelectionRange, force?: boolean = false): Array { + async getCompletions(query: string, selection: SelectionRange, force: boolean = false): Array { const MemberAvatar = sdk.getComponent('views.avatars.MemberAvatar'); // lazy-load user list into matcher diff --git a/src/components/structures/InteractiveAuth.js b/src/components/structures/InteractiveAuth.js index e7194e9fa4..53bb990e26 100644 --- a/src/components/structures/InteractiveAuth.js +++ b/src/components/structures/InteractiveAuth.js @@ -15,9 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import Matrix from 'matrix-js-sdk'; -const InteractiveAuth = Matrix.InteractiveAuth; - +import {InteractiveAuth} from "matrix-js-sdk"; import React, {createRef} from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 8dfb3dd74b..0713290a26 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -20,7 +20,7 @@ limitations under the License. import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; -import Matrix from "matrix-js-sdk"; +import * as Matrix from "matrix-js-sdk"; // focus-visible is a Polyfill for the :focus-visible CSS pseudo-attribute used by _AccessibleButton.scss import 'focus-visible'; diff --git a/src/components/structures/NotificationPanel.js b/src/components/structures/NotificationPanel.js index eb46fbe1dc..70ea24ad17 100644 --- a/src/components/structures/NotificationPanel.js +++ b/src/components/structures/NotificationPanel.js @@ -19,8 +19,7 @@ import React from 'react'; import createReactClass from 'create-react-class'; import { _t } from '../../languageHandler'; import {MatrixClientPeg} from "../../MatrixClientPeg"; - -const sdk = require('../../index'); +import * as sdk from "../../index"; /* * Component which shows the global notification list using a TimelinePanel diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index f88be944d7..94a6d04b55 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -20,11 +20,9 @@ import React from 'react'; import createReactClass from 'create-react-class'; import {ContentRepo} from "matrix-js-sdk"; import {MatrixClientPeg} from "../../MatrixClientPeg"; - -const Modal = require('../../Modal'); -const sdk = require('../../index'); -const dis = require('../../dispatcher'); - +import * as sdk from "../../index"; +import dis from "../../dispatcher"; +import Modal from "../../Modal"; import { linkifyAndSanitizeHtml } from '../../HtmlUtils'; import PropTypes from 'prop-types'; import { _t } from '../../languageHandler'; diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 4763b4104b..3996b74922 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -18,22 +18,19 @@ limitations under the License. */ import SettingsStore from "../../settings/SettingsStore"; - import React, {createRef} from 'react'; import createReactClass from 'create-react-class'; import ReactDOM from "react-dom"; import PropTypes from 'prop-types'; - -const Matrix = require("matrix-js-sdk"); -const EventTimeline = Matrix.EventTimeline; - -const sdk = require('../../index'); +import {EventTimeline} from "matrix-js-sdk"; +import * as Matrix from "matrix-js-sdk"; import { _t } from '../../languageHandler'; import {MatrixClientPeg} from "../../MatrixClientPeg"; -const dis = require("../../dispatcher"); import * as ObjectUtils from "../../ObjectUtils"; -const Modal = require("../../Modal"); -const UserActivity = require("../../UserActivity"); +import UserActivity from "../../UserActivity"; +import Modal from "../../Modal"; +import dis from "../../dispatcher"; +import * as sdk from "../../index"; import { KeyCode } from '../../Keyboard'; import Timer from '../../utils/Timer'; import shouldHideEvent from '../../shouldHideEvent'; diff --git a/src/components/structures/UploadBar.js b/src/components/structures/UploadBar.js index da0ca7fe99..adaf8824fc 100644 --- a/src/components/structures/UploadBar.js +++ b/src/components/structures/UploadBar.js @@ -18,8 +18,8 @@ import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import ContentMessages from '../../ContentMessages'; -const dis = require('../../dispatcher'); -const filesize = require('filesize'); +import dis from "../../dispatcher"; +import filesize from "filesize"; import { _t } from '../../languageHandler'; module.exports = createReactClass({ diff --git a/src/components/views/avatars/MemberAvatar.js b/src/components/views/avatars/MemberAvatar.js index cb9ef70168..6961a00d6d 100644 --- a/src/components/views/avatars/MemberAvatar.js +++ b/src/components/views/avatars/MemberAvatar.js @@ -18,8 +18,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import * as Avatar from '../../../Avatar'; -const sdk = require("../../../index"); -const dispatcher = require("../../../dispatcher"); +import * as sdk from "../../../index"; +import dis from "../../../dispatcher"; module.exports = createReactClass({ displayName: 'MemberAvatar', diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index d92638e005..e12a15766e 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -21,11 +21,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {formatDate} from '../../../DateUtils'; -const filesize = require('filesize'); -const AccessibleButton = require('../../../components/views/elements/AccessibleButton'); -const Modal = require('../../../Modal'); -const sdk = require('../../../index'); import { _t } from '../../../languageHandler'; +import filesize from "filesize"; +import AccessibleButton from "./AccessibleButton"; +import Modal from "../../../Modal"; +import * as sdk from "../../../index"; export default class ImageView extends React.Component { static propTypes = { diff --git a/src/components/views/room_settings/AliasSettings.js b/src/components/views/room_settings/AliasSettings.js index 2c43546c60..b0d291ac10 100644 --- a/src/components/views/room_settings/AliasSettings.js +++ b/src/components/views/room_settings/AliasSettings.js @@ -15,14 +15,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -const React = require('react'); +import React from "react"; import PropTypes from 'prop-types'; import {MatrixClientPeg} from "../../../MatrixClientPeg"; -const sdk = require("../../../index"); +import * as sdk from "../../../index"; import { _t } from '../../../languageHandler'; import Field from "../elements/Field"; import ErrorDialog from "../dialogs/ErrorDialog"; -const Modal = require("../../../Modal"); +import Modal from "../../../Modal"; export default class AliasSettings extends React.Component { static propTypes = { diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index b0a95e1188..de3af77946 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -18,17 +18,14 @@ limitations under the License. */ import ReplyThread from "../elements/ReplyThread"; - import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; -const classNames = require("classnames"); +import classNames from "classnames"; import { _t, _td } from '../../../languageHandler'; import * as TextForEvent from "../../../TextForEvent"; -const Modal = require('../../../Modal'); - -const sdk = require('../../../index'); - +import Modal from "../../../Modal"; +import * as sdk from "../../../index"; import dis from '../../../dispatcher'; import SettingsStore from "../../../settings/SettingsStore"; import {EventStatus, MatrixClient} from 'matrix-js-sdk'; diff --git a/src/components/views/rooms/LinkPreviewWidget.js b/src/components/views/rooms/LinkPreviewWidget.js index 1f1792f5d0..f0b51ff299 100644 --- a/src/components/views/rooms/LinkPreviewWidget.js +++ b/src/components/views/rooms/LinkPreviewWidget.js @@ -20,10 +20,9 @@ import createReactClass from 'create-react-class'; import { linkifyElement } from '../../../HtmlUtils'; import SettingsStore from "../../../settings/SettingsStore"; import {MatrixClientPeg} from "../../../MatrixClientPeg"; - -const sdk = require('../../../index'); -const ImageUtils = require('../../../ImageUtils'); -const Modal = require('../../../Modal'); +import * as sdk from "../../../index"; +import Modal from "../../../Modal"; +import * as ImageUtils from "../../../ImageUtils"; module.exports = createReactClass({ displayName: 'LinkPreviewWidget', diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index eecfd6cf96..7d47bdb4b8 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -25,8 +25,8 @@ import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; import {isValid3pidInvite} from "../../../RoomInvite"; import rate_limited_func from "../../../ratelimitedfunc"; import {MatrixClientPeg} from "../../../MatrixClientPeg"; -const sdk = require('../../../index'); -const CallHandler = require("../../../CallHandler"); +import * as sdk from "../../../index"; +import CallHandler from "../../../CallHandler"; const INITIAL_LOAD_NUM_MEMBERS = 30; const INITIAL_LOAD_NUM_INVITED = 5; diff --git a/src/components/views/rooms/MemberTile.js b/src/components/views/rooms/MemberTile.js index c002849450..c992b9d4f3 100644 --- a/src/components/views/rooms/MemberTile.js +++ b/src/components/views/rooms/MemberTile.js @@ -15,13 +15,11 @@ limitations under the License. */ import SettingsStore from "../../../settings/SettingsStore"; - import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; - -const sdk = require('../../../index'); -const dis = require('../../../dispatcher'); +import * as sdk from "../../../index"; +import dis from "../../../dispatcher"; import { _t } from '../../../languageHandler'; module.exports = createReactClass({ diff --git a/src/components/views/rooms/ReadReceiptMarker.js b/src/components/views/rooms/ReadReceiptMarker.js index 27c5e8c20e..d8ce58342a 100644 --- a/src/components/views/rooms/ReadReceiptMarker.js +++ b/src/components/views/rooms/ReadReceiptMarker.js @@ -18,14 +18,11 @@ import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; - -const sdk = require('../../../index'); - -const Velociraptor = require('../../../Velociraptor'); -require('../../../VelocityBounce'); +import('../../../VelocityBounce'); import { _t } from '../../../languageHandler'; - import {formatDate} from '../../../DateUtils'; +import Velociraptor from "../../../Velociraptor"; +import * as sdk from "../../../index"; let bounce = false; try { diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index a9b3849e79..ab15ab5a83 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -17,29 +17,28 @@ limitations under the License. import SettingsStore from "../../../settings/SettingsStore"; import Timer from "../../../utils/Timer"; - import React from "react"; import ReactDOM from "react-dom"; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; import {MatrixClientPeg} from "../../../MatrixClientPeg"; -const CallHandler = require('../../../CallHandler'); -const dis = require("../../../dispatcher"); -const sdk = require('../../../index'); import rate_limited_func from "../../../ratelimitedfunc"; import * as Rooms from '../../../Rooms'; import DMRoomMap from '../../../utils/DMRoomMap'; -const Receipt = require('../../../utils/Receipt'); import TagOrderStore from '../../../stores/TagOrderStore'; import RoomListStore from '../../../stores/RoomListStore'; import CustomRoomTagStore from '../../../stores/CustomRoomTagStore'; import GroupStore from '../../../stores/GroupStore'; import RoomSubList from '../../structures/RoomSubList'; import ResizeHandle from '../elements/ResizeHandle'; - +import CallHandler from "../../../CallHandler"; +import dis from "../../../dispatcher"; +import * as sdk from "../../../index"; +import * as Receipt from "../../../utils/Receipt"; import {Resizer} from '../../../resizer'; import {Layout, Distributor} from '../../../resizer/distributors/roomsublist2'; + const HIDE_CONFERENCE_CHANS = true; const STANDARD_TAGS_REGEX = /^(m\.(favourite|lowpriority|server_notice)|im\.vector\.fake\.(invite|recent|direct|archived))$/; const HOVER_MOVE_TIMEOUT = 1000; diff --git a/src/components/views/rooms/RoomNameEditor.js b/src/components/views/rooms/RoomNameEditor.js index 94e7e3172b..0789da2724 100644 --- a/src/components/views/rooms/RoomNameEditor.js +++ b/src/components/views/rooms/RoomNameEditor.js @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import {MatrixClientPeg} from "../../../MatrixClientPeg"; -const sdk = require('../../../index'); +import * as sdk from "../../../index"; import { _t } from '../../../languageHandler'; module.exports = createReactClass({ diff --git a/src/components/views/rooms/SearchBar.js b/src/components/views/rooms/SearchBar.js index 492c29a621..c9a9308544 100644 --- a/src/components/views/rooms/SearchBar.js +++ b/src/components/views/rooms/SearchBar.js @@ -16,8 +16,8 @@ limitations under the License. import React, {createRef} from 'react'; import createReactClass from 'create-react-class'; -const classNames = require('classnames'); -const AccessibleButton = require('../../../components/views/elements/AccessibleButton'); +import AccessibleButton from "../elements/AccessibleButton"; +import classNames from "classnames"; import { _t } from '../../../languageHandler'; module.exports = createReactClass({ diff --git a/src/components/views/rooms/UserTile.js b/src/components/views/rooms/UserTile.js index 006bd81c98..9fea1a3ad2 100644 --- a/src/components/views/rooms/UserTile.js +++ b/src/components/views/rooms/UserTile.js @@ -18,8 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import * as Avatar from '../../../Avatar'; - -const sdk = require('../../../index'); +import * as sdk from "../../../index"; module.exports = createReactClass({ displayName: 'UserTile', diff --git a/src/components/views/settings/ChangePassword.js b/src/components/views/settings/ChangePassword.js index 37a8b1a1dc..dc41e5e2c8 100644 --- a/src/components/views/settings/ChangePassword.js +++ b/src/components/views/settings/ChangePassword.js @@ -16,17 +16,15 @@ limitations under the License. */ import Field from "../elements/Field"; - import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import {MatrixClientPeg} from "../../../MatrixClientPeg"; -const Modal = require("../../../Modal"); -const sdk = require("../../../index"); - import dis from "../../../dispatcher"; import AccessibleButton from '../elements/AccessibleButton'; import { _t } from '../../../languageHandler'; +import * as sdk from "../../../index"; +import Modal from "../../../Modal"; import sessionStore from '../../../stores/SessionStore'; diff --git a/src/components/views/settings/tabs/user/LabsUserSettingsTab.js b/src/components/views/settings/tabs/user/LabsUserSettingsTab.js index 5f7d75c5c3..ec5f984d46 100644 --- a/src/components/views/settings/tabs/user/LabsUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/LabsUserSettingsTab.js @@ -19,7 +19,7 @@ import {_t} from "../../../../../languageHandler"; import PropTypes from "prop-types"; import SettingsStore, {SettingLevel} from "../../../../../settings/SettingsStore"; import LabelledToggleSwitch from "../../../elements/LabelledToggleSwitch"; -const sdk = require("../../../../.."); +import * as sdk from "../../../../../index"; export class LabsSettingToggle extends React.Component { static propTypes = { diff --git a/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.js b/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.js index 575221c780..7f3a2c401d 100644 --- a/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.js @@ -21,8 +21,7 @@ import {ListRule} from "../../../../../mjolnir/ListRule"; import {BanList, RULE_SERVER, RULE_USER} from "../../../../../mjolnir/BanList"; import Modal from "../../../../../Modal"; import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; - -const sdk = require("../../../../.."); +import * as sdk from "../../../../../index"; export default class MjolnirUserSettingsTab extends React.Component { constructor() { diff --git a/src/components/views/settings/tabs/user/NotificationUserSettingsTab.js b/src/components/views/settings/tabs/user/NotificationUserSettingsTab.js index 970659af6e..2e649cb7f8 100644 --- a/src/components/views/settings/tabs/user/NotificationUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/NotificationUserSettingsTab.js @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import {_t} from "../../../../../languageHandler"; -const sdk = require("../../../../.."); +import * as sdk from "../../../../../index"; export default class NotificationUserSettingsTab extends React.Component { constructor() { diff --git a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js index d0119ecbbf..f4fbcada3a 100644 --- a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js @@ -21,8 +21,8 @@ import Field from "../../../elements/Field"; import AccessibleButton from "../../../elements/AccessibleButton"; import {SettingLevel} from "../../../../../settings/SettingsStore"; import {MatrixClientPeg} from "../../../../../MatrixClientPeg"; -const Modal = require("../../../../../Modal"); -const sdk = require("../../../../.."); +import * as sdk from "../../../../../index"; +import Modal from "../../../../../Modal"; export default class VoiceUserSettingsTab extends React.Component { constructor() { diff --git a/src/dispatcher.js b/src/dispatcher.js index 48c8dc86e9..5abdb29604 100644 --- a/src/dispatcher.js +++ b/src/dispatcher.js @@ -17,7 +17,7 @@ limitations under the License. 'use strict'; -const flux = require("flux"); +import flux from "flux"; class MatrixDispatcher extends flux.Dispatcher { /** diff --git a/src/utils/createMatrixClient.js b/src/utils/createMatrixClient.js index dee9324460..c8ff35a584 100644 --- a/src/utils/createMatrixClient.js +++ b/src/utils/createMatrixClient.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import Matrix from 'matrix-js-sdk'; +import * as Matrix from 'matrix-js-sdk'; const localStorage = window.localStorage; diff --git a/src/utils/permalinks/Permalinks.js b/src/utils/permalinks/Permalinks.js index 591cdbb576..1174e59da6 100644 --- a/src/utils/permalinks/Permalinks.js +++ b/src/utils/permalinks/Permalinks.js @@ -21,8 +21,7 @@ import SpecPermalinkConstructor, {baseUrl as matrixtoBaseUrl} from "./SpecPermal import PermalinkConstructor, {PermalinkParts} from "./PermalinkConstructor"; import RiotPermalinkConstructor from "./RiotPermalinkConstructor"; import matrixLinkify from "../../linkify-matrix"; - -const SdkConfig = require("../../SdkConfig"); +import SdkConfig from "../../SdkConfig"; // The maximum number of servers to pick when working out which servers // to add to permalinks. The servers are appended as ?via=example.org