Consume more imports from matrix-js-sdk/src/matrix (#11449)
This commit is contained in:
parent
aa6e3654b8
commit
99e80dd296
89 changed files with 236 additions and 172 deletions
14
.eslintrc.js
14
.eslintrc.js
|
@ -144,20 +144,6 @@ module.exports = {
|
||||||
"!matrix-js-sdk/src/models/read-receipt",
|
"!matrix-js-sdk/src/models/read-receipt",
|
||||||
"!matrix-js-sdk/src/models/relations-container",
|
"!matrix-js-sdk/src/models/relations-container",
|
||||||
"!matrix-js-sdk/src/models/related-relations",
|
"!matrix-js-sdk/src/models/related-relations",
|
||||||
"!matrix-js-sdk/src/@types",
|
|
||||||
"!matrix-js-sdk/src/@types/global",
|
|
||||||
"!matrix-js-sdk/src/@types/auth",
|
|
||||||
"!matrix-js-sdk/src/@types/beacon",
|
|
||||||
"!matrix-js-sdk/src/@types/threepids",
|
|
||||||
"!matrix-js-sdk/src/@types/polls",
|
|
||||||
"!matrix-js-sdk/src/@types/crypto",
|
|
||||||
"!matrix-js-sdk/src/@types/local_notifications",
|
|
||||||
"!matrix-js-sdk/src/@types/location",
|
|
||||||
"!matrix-js-sdk/src/@types/topic",
|
|
||||||
"!matrix-js-sdk/src/@types/registration",
|
|
||||||
"!matrix-js-sdk/src/@types/read_receipts",
|
|
||||||
"!matrix-js-sdk/src/@types/extensible_events",
|
|
||||||
"!matrix-js-sdk/src/@types/IIdentityServerProvider",
|
|
||||||
],
|
],
|
||||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
import type { MatrixClient, MatrixEvent, ISendEventResponse } from "matrix-js-sdk/src/matrix";
|
import type { MatrixClient, MatrixEvent, ISendEventResponse, ReceiptType } from "matrix-js-sdk/src/matrix";
|
||||||
import type { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
import { HomeserverInstance } from "../../plugins/utils/homeserver";
|
import { HomeserverInstance } from "../../plugins/utils/homeserver";
|
||||||
|
|
||||||
describe("Read receipts", () => {
|
describe("Read receipts", () => {
|
||||||
|
|
1
cypress/global.d.ts
vendored
1
cypress/global.d.ts
vendored
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
import "../src/@types/global";
|
import "../src/@types/global";
|
||||||
import "../src/@types/svg";
|
import "../src/@types/svg";
|
||||||
import "../src/@types/raw-loader";
|
import "../src/@types/raw-loader";
|
||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import "matrix-js-sdk/src/@types/global";
|
import "matrix-js-sdk/src/@types/global";
|
||||||
import type {
|
import type {
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
|
|
|
@ -26,8 +26,8 @@ import type {
|
||||||
UploadOpts,
|
UploadOpts,
|
||||||
ICreateRoomOpts,
|
ICreateRoomOpts,
|
||||||
ISendEventResponse,
|
ISendEventResponse,
|
||||||
|
ReceiptType,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import type { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
import Chainable = Cypress.Chainable;
|
import Chainable = Cypress.Chainable;
|
||||||
import { UserCredentials } from "./login";
|
import { UserCredentials } from "./login";
|
||||||
|
|
||||||
|
|
1
src/@types/global.d.ts
vendored
1
src/@types/global.d.ts
vendored
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import "matrix-js-sdk/src/@types/global"; // load matrix-js-sdk's type extensions first
|
import "matrix-js-sdk/src/@types/global"; // load matrix-js-sdk's type extensions first
|
||||||
import "@types/modernizr";
|
import "@types/modernizr";
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ import {
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
MatrixError,
|
MatrixError,
|
||||||
HTTPError,
|
HTTPError,
|
||||||
|
IThreepid,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { IThreepid } from "matrix-js-sdk/src/@types/threepids";
|
|
||||||
|
|
||||||
import Modal from "./Modal";
|
import Modal from "./Modal";
|
||||||
import { _t, UserFriendlyError } from "./languageHandler";
|
import { _t, UserFriendlyError } from "./languageHandler";
|
||||||
|
|
10
src/Login.ts
10
src/Login.ts
|
@ -15,9 +15,15 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { createClient, MatrixClient, LoginFlow } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
createClient,
|
||||||
|
MatrixClient,
|
||||||
|
LoginFlow,
|
||||||
|
DELEGATED_OIDC_COMPATIBILITY,
|
||||||
|
ILoginFlow,
|
||||||
|
LoginRequest,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { DELEGATED_OIDC_COMPATIBILITY, ILoginFlow, LoginRequest } from "matrix-js-sdk/src/@types/auth";
|
|
||||||
|
|
||||||
import { IMatrixClientCreds } from "./MatrixClientPeg";
|
import { IMatrixClientCreds } from "./MatrixClientPeg";
|
||||||
import SecurityCustomisations from "./customisations/Security";
|
import SecurityCustomisations from "./customisations/Security";
|
||||||
|
|
|
@ -27,9 +27,9 @@ import {
|
||||||
SyncState,
|
SyncState,
|
||||||
SyncStateData,
|
SyncStateData,
|
||||||
IRoomTimelineData,
|
IRoomTimelineData,
|
||||||
|
M_LOCATION,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
|
||||||
import { PermissionChanged as PermissionChangedEvent } from "@matrix-org/analytics-events/types/typescript/PermissionChanged";
|
import { PermissionChanged as PermissionChangedEvent } from "@matrix-org/analytics-events/types/typescript/PermissionChanged";
|
||||||
|
|
||||||
import { MatrixClientPeg } from "./MatrixClientPeg";
|
import { MatrixClientPeg } from "./MatrixClientPeg";
|
||||||
|
|
|
@ -18,9 +18,8 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { User, IContent, Direction, ContentHelpers } from "matrix-js-sdk/src/matrix";
|
import { User, IContent, Direction, ContentHelpers, MRoomTopicEventContent } from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { MRoomTopicEventContent } from "matrix-js-sdk/src/@types/topic";
|
|
||||||
|
|
||||||
import dis from "./dispatcher/dispatcher";
|
import dis from "./dispatcher/dispatcher";
|
||||||
import { _t, _td, UserFriendlyError } from "./languageHandler";
|
import { _t, _td, UserFriendlyError } from "./languageHandler";
|
||||||
|
|
|
@ -23,10 +23,11 @@ import {
|
||||||
JoinRule,
|
JoinRule,
|
||||||
EventType,
|
EventType,
|
||||||
MsgType,
|
MsgType,
|
||||||
|
M_POLL_START,
|
||||||
|
M_POLL_END,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { removeDirectionOverrideChars } from "matrix-js-sdk/src/utils";
|
import { removeDirectionOverrideChars } from "matrix-js-sdk/src/utils";
|
||||||
import { M_POLL_START, M_POLL_END } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
|
|
||||||
import { _t } from "./languageHandler";
|
import { _t } from "./languageHandler";
|
||||||
|
|
|
@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { M_BEACON } from "matrix-js-sdk/src/@types/beacon";
|
import { M_BEACON, Room, Thread, MatrixEvent, EventType, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { Room, Thread, MatrixEvent, EventType, MatrixClient } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import shouldHideEvent from "./shouldHideEvent";
|
import shouldHideEvent from "./shouldHideEvent";
|
||||||
import { haveRendererForEvent } from "./events/EventTileFactory";
|
import { haveRendererForEvent } from "./events/EventTileFactory";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
import { IThreepid, ThreepidMedium, MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix";
|
||||||
import { MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import IdentityAuthClient from "./IdentityAuthClient";
|
import IdentityAuthClient from "./IdentityAuthClient";
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,16 @@ limitations under the License.
|
||||||
import React, { createRef, ReactNode, TransitionEvent } from "react";
|
import React, { createRef, ReactNode, TransitionEvent } from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { Room, MatrixClient, RoomStateEvent, EventStatus, MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
Room,
|
||||||
|
MatrixClient,
|
||||||
|
RoomStateEvent,
|
||||||
|
EventStatus,
|
||||||
|
MatrixEvent,
|
||||||
|
EventType,
|
||||||
|
M_BEACON_INFO,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
import { isSupportedReceiptType } from "matrix-js-sdk/src/utils";
|
import { isSupportedReceiptType } from "matrix-js-sdk/src/utils";
|
||||||
import { Optional } from "matrix-events-sdk";
|
import { Optional } from "matrix-events-sdk";
|
||||||
|
|
||||||
|
|
|
@ -37,10 +37,10 @@ import {
|
||||||
TimelineWindow,
|
TimelineWindow,
|
||||||
Thread,
|
Thread,
|
||||||
ThreadEvent,
|
ThreadEvent,
|
||||||
|
ReceiptType,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { debounce, findLastIndex, throttle } from "lodash";
|
import { debounce, findLastIndex, throttle } from "lodash";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
|
|
||||||
import SettingsStore from "../../settings/SettingsStore";
|
import SettingsStore from "../../settings/SettingsStore";
|
||||||
import { Layout } from "../../settings/enums/Layout";
|
import { Layout } from "../../settings/enums/Layout";
|
||||||
|
|
|
@ -26,11 +26,11 @@ import {
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
SSOFlow,
|
SSOFlow,
|
||||||
SSOAction,
|
SSOAction,
|
||||||
|
RegisterResponse,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import React, { Fragment, ReactNode } from "react";
|
import React, { Fragment, ReactNode } from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { RegisterResponse } from "matrix-js-sdk/src/@types/registration";
|
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import { adminContactStrings, messageForResourceLimitError, resourceLimitStrings } from "../../../utils/ErrorUtils";
|
import { adminContactStrings, messageForResourceLimitError, resourceLimitStrings } from "../../../utils/ErrorUtils";
|
||||||
|
|
|
@ -26,8 +26,8 @@ import {
|
||||||
RelationType,
|
RelationType,
|
||||||
Relations,
|
Relations,
|
||||||
Thread,
|
Thread,
|
||||||
|
M_POLL_START,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
|
|
||||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||||
import dis from "../../../dispatcher/dispatcher";
|
import dis from "../../../dispatcher/dispatcher";
|
||||||
|
|
|
@ -24,9 +24,11 @@ import {
|
||||||
EventType,
|
EventType,
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
ContentHelpers,
|
ContentHelpers,
|
||||||
|
ILocationContent,
|
||||||
|
LocationAssetType,
|
||||||
|
M_TIMESTAMP,
|
||||||
|
M_BEACON,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { ILocationContent, LocationAssetType, M_TIMESTAMP } from "matrix-js-sdk/src/@types/location";
|
|
||||||
import { M_BEACON } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import dis from "../../../dispatcher/dispatcher";
|
import dis from "../../../dispatcher/dispatcher";
|
||||||
|
|
|
@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { NotificationCountType, Room, Thread } from "matrix-js-sdk/src/matrix";
|
import { NotificationCountType, Room, Thread, ReceiptType } from "matrix-js-sdk/src/matrix";
|
||||||
import React, { useContext } from "react";
|
import React, { useContext } from "react";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
import { ReadReceipt } from "matrix-js-sdk/src/models/read-receipt";
|
import { ReadReceipt } from "matrix-js-sdk/src/models/read-receipt";
|
||||||
|
|
||||||
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
|
||||||
|
|
|
@ -15,15 +15,16 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ChangeEvent, createRef } from "react";
|
import React, { ChangeEvent, createRef } from "react";
|
||||||
import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
|
||||||
import {
|
import {
|
||||||
|
Room,
|
||||||
|
MatrixEvent,
|
||||||
KnownPollKind,
|
KnownPollKind,
|
||||||
M_POLL_KIND_DISCLOSED,
|
M_POLL_KIND_DISCLOSED,
|
||||||
M_POLL_KIND_UNDISCLOSED,
|
M_POLL_KIND_UNDISCLOSED,
|
||||||
M_POLL_START,
|
M_POLL_START,
|
||||||
} from "matrix-js-sdk/src/@types/polls";
|
IPartialEvent,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
import { IPartialEvent } from "matrix-js-sdk/src/@types/extensible_events";
|
|
||||||
|
|
||||||
import ScrollableBaseModal, { IScrollableBaseState } from "../dialogs/ScrollableBaseModal";
|
import ScrollableBaseModal, { IScrollableBaseState } from "../dialogs/ScrollableBaseModal";
|
||||||
import QuestionDialog from "../dialogs/QuestionDialog";
|
import QuestionDialog from "../dialogs/QuestionDialog";
|
||||||
|
|
|
@ -17,9 +17,15 @@ limitations under the License.
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { chunk } from "lodash";
|
import { chunk } from "lodash";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { MatrixClient, IdentityProviderBrand, SSOFlow, SSOAction } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
MatrixClient,
|
||||||
|
IdentityProviderBrand,
|
||||||
|
SSOFlow,
|
||||||
|
SSOAction,
|
||||||
|
IIdentityProvider,
|
||||||
|
DELEGATED_OIDC_COMPATIBILITY,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { Signup } from "@matrix-org/analytics-events/types/typescript/Signup";
|
import { Signup } from "@matrix-org/analytics-events/types/typescript/Signup";
|
||||||
import { IIdentityProvider, DELEGATED_OIDC_COMPATIBILITY } from "matrix-js-sdk/src/@types/auth";
|
|
||||||
|
|
||||||
import PlatformPeg from "../../../PlatformPeg";
|
import PlatformPeg from "../../../PlatformPeg";
|
||||||
import AccessibleButton from "./AccessibleButton";
|
import AccessibleButton from "./AccessibleButton";
|
||||||
|
|
|
@ -24,9 +24,9 @@ import {
|
||||||
RelationType,
|
RelationType,
|
||||||
IRedactOpts,
|
IRedactOpts,
|
||||||
ContentHelpers,
|
ContentHelpers,
|
||||||
|
M_BEACON,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { randomString } from "matrix-js-sdk/src/randomstring";
|
import { randomString } from "matrix-js-sdk/src/randomstring";
|
||||||
import { M_BEACON } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||||
|
|
|
@ -16,8 +16,16 @@ limitations under the License.
|
||||||
|
|
||||||
import React, { ReactNode } from "react";
|
import React, { ReactNode } from "react";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { MatrixEvent, MatrixClient, Relations, Poll, PollEvent } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { M_POLL_KIND_DISCLOSED, M_POLL_RESPONSE, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
MatrixEvent,
|
||||||
|
MatrixClient,
|
||||||
|
Relations,
|
||||||
|
Poll,
|
||||||
|
PollEvent,
|
||||||
|
M_POLL_KIND_DISCLOSED,
|
||||||
|
M_POLL_RESPONSE,
|
||||||
|
M_POLL_START,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { RelatedRelations } from "matrix-js-sdk/src/models/related-relations";
|
import { RelatedRelations } from "matrix-js-sdk/src/models/related-relations";
|
||||||
import { PollStartEvent, PollAnswerSubevent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent, PollAnswerSubevent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
import { PollResponseEvent } from "matrix-js-sdk/src/extensible_events_v1/PollResponseEvent";
|
import { PollResponseEvent } from "matrix-js-sdk/src/extensible_events_v1/PollResponseEvent";
|
||||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useEffect, useState, useContext, ForwardRefExoticComponent } from "react";
|
import React, { useEffect, useState, useContext, ForwardRefExoticComponent } from "react";
|
||||||
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, M_TEXT } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { Icon as PollIcon } from "../../../../res/img/element-icons/room/composer/poll.svg";
|
import { Icon as PollIcon } from "../../../../res/img/element-icons/room/composer/poll.svg";
|
||||||
|
|
|
@ -17,9 +17,15 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ReactElement, useCallback, useContext, useEffect } from "react";
|
import React, { ReactElement, useCallback, useContext, useEffect } from "react";
|
||||||
import { EventStatus, MatrixEvent, MatrixEventEvent, MsgType, RelationType } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
EventStatus,
|
||||||
|
MatrixEvent,
|
||||||
|
MatrixEventEvent,
|
||||||
|
MsgType,
|
||||||
|
RelationType,
|
||||||
|
M_BEACON_INFO,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
|
|
||||||
import { Icon as ContextMenuIcon } from "../../../../res/img/element-icons/context-menu.svg";
|
import { Icon as ContextMenuIcon } from "../../../../res/img/element-icons/context-menu.svg";
|
||||||
import { Icon as EditIcon } from "../../../../res/img/element-icons/room/message-bar/edit.svg";
|
import { Icon as EditIcon } from "../../../../res/img/element-icons/room/message-bar/edit.svg";
|
||||||
|
|
|
@ -15,10 +15,15 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { createRef } from "react";
|
import React, { createRef } from "react";
|
||||||
import { EventType, MsgType, MatrixEventEvent } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
EventType,
|
||||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
MsgType,
|
||||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
MatrixEventEvent,
|
||||||
|
M_BEACON_INFO,
|
||||||
|
M_LOCATION,
|
||||||
|
M_POLL_END,
|
||||||
|
M_POLL_START,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import { Mjolnir } from "../../../mjolnir/Mjolnir";
|
import { Mjolnir } from "../../../mjolnir/Mjolnir";
|
||||||
|
|
|
@ -15,8 +15,8 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
import {
|
import {
|
||||||
|
M_POLL_START,
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
Direction,
|
Direction,
|
||||||
EventTimeline,
|
EventTimeline,
|
||||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { IEventRelation, Room, MatrixClient, THREAD_RELATION_TYPE } from "matrix-js-sdk/src/matrix";
|
import { IEventRelation, Room, MatrixClient, THREAD_RELATION_TYPE, M_POLL_START } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
import React, { createContext, ReactElement, ReactNode, useContext, useRef } from "react";
|
import React, { createContext, ReactElement, ReactNode, useContext, useRef } from "react";
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
|
|
|
@ -15,10 +15,17 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ReactNode } from "react";
|
import React, { ReactNode } from "react";
|
||||||
import { IAnnotatedPushRule, IPusher, PushRuleAction, PushRuleKind, RuleId } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
IAnnotatedPushRule,
|
||||||
|
IPusher,
|
||||||
|
PushRuleAction,
|
||||||
|
PushRuleKind,
|
||||||
|
RuleId,
|
||||||
|
IThreepid,
|
||||||
|
ThreepidMedium,
|
||||||
|
LocalNotificationSettings,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { LocalNotificationSettings } from "matrix-js-sdk/src/@types/local_notifications";
|
|
||||||
|
|
||||||
import Spinner from "../elements/Spinner";
|
import Spinner from "../elements/Spinner";
|
||||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React, { ReactNode } from "react";
|
import React, { ReactNode } from "react";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { IThreepid } from "matrix-js-sdk/src/@types/threepids";
|
import { IThreepid } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||||
|
|
|
@ -16,9 +16,8 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
import { ThreepidMedium, MatrixError } from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { MatrixError } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import { _t, UserFriendlyError } from "../../../../languageHandler";
|
import { _t, UserFriendlyError } from "../../../../languageHandler";
|
||||||
import { MatrixClientPeg } from "../../../../MatrixClientPeg";
|
import { MatrixClientPeg } from "../../../../MatrixClientPeg";
|
||||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
import { ThreepidMedium } from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { _t, UserFriendlyError } from "../../../../languageHandler";
|
import { _t, UserFriendlyError } from "../../../../languageHandler";
|
||||||
|
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { LocalNotificationSettings } from "matrix-js-sdk/src/@types/local_notifications";
|
import { LocalNotificationSettings } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { _t } from "../../../../languageHandler";
|
import { _t } from "../../../../languageHandler";
|
||||||
import Spinner from "../../elements/Spinner";
|
import Spinner from "../../elements/Spinner";
|
||||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { IPusher, PUSHER_ENABLED } from "matrix-js-sdk/src/matrix";
|
import { IPusher, PUSHER_ENABLED, LocalNotificationSettings } from "matrix-js-sdk/src/matrix";
|
||||||
import { LocalNotificationSettings } from "matrix-js-sdk/src/@types/local_notifications";
|
|
||||||
|
|
||||||
import { formatDate } from "../../../../DateUtils";
|
import { formatDate } from "../../../../DateUtils";
|
||||||
import { _t } from "../../../../languageHandler";
|
import { _t } from "../../../../languageHandler";
|
||||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ForwardedRef, forwardRef } from "react";
|
import React, { ForwardedRef, forwardRef } from "react";
|
||||||
import { IPusher, PUSHER_DEVICE_ID } from "matrix-js-sdk/src/matrix";
|
import { IPusher, PUSHER_DEVICE_ID, LocalNotificationSettings } from "matrix-js-sdk/src/matrix";
|
||||||
import { LocalNotificationSettings } from "matrix-js-sdk/src/@types/local_notifications";
|
|
||||||
|
|
||||||
import { _t } from "../../../../languageHandler";
|
import { _t } from "../../../../languageHandler";
|
||||||
import AccessibleButton from "../../elements/AccessibleButton";
|
import AccessibleButton from "../../elements/AccessibleButton";
|
||||||
|
|
|
@ -26,10 +26,10 @@ import {
|
||||||
PUSHER_ENABLED,
|
PUSHER_ENABLED,
|
||||||
UNSTABLE_MSC3852_LAST_SEEN_UA,
|
UNSTABLE_MSC3852_LAST_SEEN_UA,
|
||||||
MatrixError,
|
MatrixError,
|
||||||
|
LocalNotificationSettings,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { VerificationRequest } from "matrix-js-sdk/src/crypto-api";
|
import { VerificationRequest } from "matrix-js-sdk/src/crypto-api";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { LocalNotificationSettings } from "matrix-js-sdk/src/@types/local_notifications";
|
|
||||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||||
|
|
||||||
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../../contexts/MatrixClientContext";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
import { ThreepidMedium, IPusher } from "matrix-js-sdk/src/matrix";
|
||||||
import { IPusher } from "matrix-js-sdk/src/matrix";
|
|
||||||
import React, { useCallback, useMemo } from "react";
|
import React, { useCallback, useMemo } from "react";
|
||||||
|
|
||||||
import { useMatrixClientContext } from "../../../../contexts/MatrixClientContext";
|
import { useMatrixClientContext } from "../../../../contexts/MatrixClientContext";
|
||||||
|
|
|
@ -17,8 +17,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ReactNode } from "react";
|
import React, { ReactNode } from "react";
|
||||||
import { SERVICE_TYPES, HTTPError } from "matrix-js-sdk/src/matrix";
|
import { SERVICE_TYPES, HTTPError, IThreepid, ThreepidMedium } from "matrix-js-sdk/src/matrix";
|
||||||
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { Icon as WarningIcon } from "../../../../../../res/img/feather-customised/warning-triangle.svg";
|
import { Icon as WarningIcon } from "../../../../../../res/img/feather-customised/warning-triangle.svg";
|
||||||
|
|
|
@ -15,9 +15,17 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { MatrixEvent, EventType, MsgType, RelationType, MatrixClient, GroupCallIntent } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
MatrixEvent,
|
||||||
|
EventType,
|
||||||
|
MsgType,
|
||||||
|
RelationType,
|
||||||
|
MatrixClient,
|
||||||
|
GroupCallIntent,
|
||||||
|
M_POLL_END,
|
||||||
|
M_POLL_START,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { Optional } from "matrix-events-sdk";
|
import { Optional } from "matrix-events-sdk";
|
||||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
|
|
||||||
import SettingsStore from "../settings/SettingsStore";
|
import SettingsStore from "../settings/SettingsStore";
|
||||||
import LegacyCallEventGrouper from "../components/structures/LegacyCallEventGrouper";
|
import LegacyCallEventGrouper from "../components/structures/LegacyCallEventGrouper";
|
||||||
|
|
|
@ -14,9 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
import { M_POLL_END, M_POLL_START, M_BEACON_INFO, MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import { getShareableLocationEventForBeacon } from "../../utils/beacon/getShareableLocation";
|
import { getShareableLocationEventForBeacon } from "../../utils/beacon/getShareableLocation";
|
||||||
import { VoiceBroadcastInfoEventType } from "../../voice-broadcast/types";
|
import { VoiceBroadcastInfoEventType } from "../../voice-broadcast/types";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
import { M_BEACON_INFO, MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import { getShareableLocationEventForBeacon } from "../../utils/beacon/getShareableLocation";
|
import { getShareableLocationEventForBeacon } from "../../utils/beacon/getShareableLocation";
|
||||||
import { isLocationEvent } from "../../utils/EventUtils";
|
import { isLocationEvent } from "../../utils/EventUtils";
|
||||||
|
|
|
@ -15,8 +15,14 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { EventType, MatrixEvent, Room, RoomStateEvent, ContentHelpers } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { MRoomTopicEventContent } from "matrix-js-sdk/src/@types/topic";
|
EventType,
|
||||||
|
MatrixEvent,
|
||||||
|
Room,
|
||||||
|
RoomStateEvent,
|
||||||
|
ContentHelpers,
|
||||||
|
MRoomTopicEventContent,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { Optional } from "matrix-events-sdk";
|
import { Optional } from "matrix-events-sdk";
|
||||||
|
|
||||||
import { useTypedEventEmitter } from "../useEventEmitter";
|
import { useTypedEventEmitter } from "../useEventEmitter";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
import { MatrixClient, IThreepid } from "matrix-js-sdk/src/matrix";
|
||||||
import { IThreepid } from "matrix-js-sdk/src/@types/threepids";
|
|
||||||
|
|
||||||
import { useAsyncRefreshMemo } from "./useAsyncRefreshMemo";
|
import { useAsyncRefreshMemo } from "./useAsyncRefreshMemo";
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,9 @@ import {
|
||||||
RoomState,
|
RoomState,
|
||||||
RoomStateEvent,
|
RoomStateEvent,
|
||||||
ContentHelpers,
|
ContentHelpers,
|
||||||
|
MBeaconInfoEventContent,
|
||||||
|
M_BEACON,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { MBeaconInfoEventContent, M_BEACON } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import defaultDispatcher from "../dispatcher/dispatcher";
|
import defaultDispatcher from "../dispatcher/dispatcher";
|
||||||
|
|
|
@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Room, RelationType, MatrixEvent, Thread } from "matrix-js-sdk/src/matrix";
|
import { Room, RelationType, MatrixEvent, Thread, M_POLL_START } from "matrix-js-sdk/src/matrix";
|
||||||
import { isNullOrUndefined } from "matrix-js-sdk/src/utils";
|
import { isNullOrUndefined } from "matrix-js-sdk/src/utils";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
|
|
||||||
import { ActionPayload } from "../../dispatcher/payloads";
|
import { ActionPayload } from "../../dispatcher/payloads";
|
||||||
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
|
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, PollStartEventContent } from "matrix-js-sdk/src/matrix";
|
||||||
import { PollStartEventContent } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
import { InvalidEventError } from "matrix-js-sdk/src/extensible_events_v1/InvalidEventError";
|
import { InvalidEventError } from "matrix-js-sdk/src/extensible_events_v1/InvalidEventError";
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,16 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixEvent, IContent, MatrixClient, EventType, MsgType } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
MatrixEvent,
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
IContent,
|
||||||
|
MatrixClient,
|
||||||
|
EventType,
|
||||||
|
MsgType,
|
||||||
|
M_POLL_END,
|
||||||
|
M_POLL_START,
|
||||||
|
M_BEACON_INFO,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import SettingsStore from "../settings/SettingsStore";
|
import SettingsStore from "../settings/SettingsStore";
|
||||||
import { haveRendererForEvent, JitsiEventFactory, JSONEventFactory, pickFactory } from "../events/EventTileFactory";
|
import { haveRendererForEvent, JitsiEventFactory, JSONEventFactory, pickFactory } from "../events/EventTileFactory";
|
||||||
|
|
|
@ -23,11 +23,12 @@ import {
|
||||||
RelationType,
|
RelationType,
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
THREAD_RELATION_TYPE,
|
THREAD_RELATION_TYPE,
|
||||||
|
M_POLL_END,
|
||||||
|
M_POLL_START,
|
||||||
|
M_LOCATION,
|
||||||
|
M_BEACON_INFO,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
|
|
||||||
import shouldHideEvent from "../shouldHideEvent";
|
import shouldHideEvent from "../shouldHideEvent";
|
||||||
import { GetRelationsForEvent } from "../components/views/rooms/EventTile";
|
import { GetRelationsForEvent } from "../components/views/rooms/EventTile";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, EventType, M_POLL_START } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
|
|
||||||
export default class PinningUtils {
|
export default class PinningUtils {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,11 +15,18 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IContent, IEventRelation, MatrixEvent, MsgType, THREAD_RELATION_TYPE } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
|
IContent,
|
||||||
|
IEventRelation,
|
||||||
|
MatrixEvent,
|
||||||
|
MsgType,
|
||||||
|
THREAD_RELATION_TYPE,
|
||||||
|
M_BEACON_INFO,
|
||||||
|
M_POLL_END,
|
||||||
|
M_POLL_START,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import sanitizeHtml from "sanitize-html";
|
import sanitizeHtml from "sanitize-html";
|
||||||
import escapeHtml from "escape-html";
|
import escapeHtml from "escape-html";
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
|
|
||||||
import { PERMITTED_URL_SCHEMES } from "./UrlUtils";
|
import { PERMITTED_URL_SCHEMES } from "./UrlUtils";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, M_BEACON_INFO } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* beacon_info events without live property set to true
|
* beacon_info events without live property set to true
|
||||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ILocationContent, LocationAssetType, M_ASSET } from "matrix-js-sdk/src/@types/location";
|
import { ILocationContent, LocationAssetType, M_ASSET } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
export const isSelfLocation = (locationContent: ILocationContent): boolean => {
|
export const isSelfLocation = (locationContent: ILocationContent): boolean => {
|
||||||
const asset = M_ASSET.findIn(locationContent) as { type: string };
|
const asset = M_ASSET.findIn(locationContent) as { type: string };
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, M_LOCATION } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the geo-URI contained within a location event.
|
* Find the geo-URI contained within a location event.
|
||||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as maplibregl from "maplibre-gl";
|
import * as maplibregl from "maplibre-gl";
|
||||||
import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import { MatrixClient, MatrixEvent, M_LOCATION } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { _t } from "../../languageHandler";
|
import { _t } from "../../languageHandler";
|
||||||
|
|
|
@ -19,9 +19,9 @@ import {
|
||||||
LOCAL_NOTIFICATION_SETTINGS_PREFIX,
|
LOCAL_NOTIFICATION_SETTINGS_PREFIX,
|
||||||
NotificationCountType,
|
NotificationCountType,
|
||||||
Room,
|
Room,
|
||||||
|
LocalNotificationSettings,
|
||||||
|
ReceiptType,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { LocalNotificationSettings } from "matrix-js-sdk/src/@types/local_notifications";
|
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
|
|
||||||
import SettingsStore from "../settings/SettingsStore";
|
import SettingsStore from "../settings/SettingsStore";
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,15 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IContent, MatrixEvent, MsgType } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
IContent,
|
||||||
import { LocationAssetType, M_ASSET } from "matrix-js-sdk/src/@types/location";
|
MatrixEvent,
|
||||||
import { M_POLL_END } from "matrix-js-sdk/src/@types/polls";
|
MsgType,
|
||||||
|
M_BEACON_INFO,
|
||||||
|
LocationAssetType,
|
||||||
|
M_ASSET,
|
||||||
|
M_POLL_END,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getNestedReplyText,
|
getNestedReplyText,
|
||||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
import { MatrixEvent, EventType, MsgType, Room } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, EventType, MsgType, Room, ReceiptType } from "matrix-js-sdk/src/matrix";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { haveRendererForEvent } from "../src/events/EventTileFactory";
|
import { haveRendererForEvent } from "../src/events/EventTileFactory";
|
||||||
|
|
|
@ -17,9 +17,8 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { EventEmitter } from "events";
|
import { EventEmitter } from "events";
|
||||||
import { MatrixEvent, Room, RoomMember, Thread } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, Room, RoomMember, Thread, ReceiptType } from "matrix-js-sdk/src/matrix";
|
||||||
import { render } from "@testing-library/react";
|
import { render } from "@testing-library/react";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
|
|
||||||
import MessagePanel, { shouldFormContinuation } from "../../../src/components/structures/MessagePanel";
|
import MessagePanel, { shouldFormContinuation } from "../../../src/components/structures/MessagePanel";
|
||||||
import SettingsStore from "../../../src/settings/SettingsStore";
|
import SettingsStore from "../../../src/settings/SettingsStore";
|
||||||
|
|
|
@ -15,8 +15,8 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { render, waitFor, screen } from "@testing-library/react";
|
import { render, waitFor, screen } from "@testing-library/react";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
import {
|
import {
|
||||||
|
ReceiptType,
|
||||||
EventTimelineSet,
|
EventTimelineSet,
|
||||||
EventType,
|
EventType,
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
|
|
|
@ -18,7 +18,7 @@ import React from "react";
|
||||||
import { fireEvent, render, screen, waitForElementToBeRemoved } from "@testing-library/react";
|
import { fireEvent, render, screen, waitForElementToBeRemoved } from "@testing-library/react";
|
||||||
import { mocked, MockedObject } from "jest-mock";
|
import { mocked, MockedObject } from "jest-mock";
|
||||||
import fetchMock from "fetch-mock-jest";
|
import fetchMock from "fetch-mock-jest";
|
||||||
import { DELEGATED_OIDC_COMPATIBILITY, IdentityProviderBrand } from "matrix-js-sdk/src/@types/auth";
|
import { DELEGATED_OIDC_COMPATIBILITY, IdentityProviderBrand } from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import * as Matrix from "matrix-js-sdk/src/matrix";
|
import * as Matrix from "matrix-js-sdk/src/matrix";
|
||||||
import { OidcError } from "matrix-js-sdk/src/oidc/error";
|
import { OidcError } from "matrix-js-sdk/src/oidc/error";
|
||||||
|
|
|
@ -27,8 +27,8 @@ import {
|
||||||
EventType,
|
EventType,
|
||||||
FeatureSupport,
|
FeatureSupport,
|
||||||
Thread,
|
Thread,
|
||||||
|
M_POLL_KIND_DISCLOSED,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import { fireEvent, getByLabelText, render, screen } from "@testing-library/react";
|
import { fireEvent, getByLabelText, render, screen } from "@testing-library/react";
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
import { ReceiptType, MatrixClient, PendingEventOrdering, Room } from "matrix-js-sdk/src/matrix";
|
||||||
import { MatrixClient, PendingEventOrdering, Room } from "matrix-js-sdk/src/matrix";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,15 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { LocationAssetType, M_ASSET, M_LOCATION, M_TIMESTAMP } from "matrix-js-sdk/src/@types/location";
|
MatrixEvent,
|
||||||
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
|
EventType,
|
||||||
|
LocationAssetType,
|
||||||
|
M_ASSET,
|
||||||
|
M_LOCATION,
|
||||||
|
M_TIMESTAMP,
|
||||||
|
M_TEXT,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { act, fireEvent, getByTestId, render, RenderResult, screen } from "@testing-library/react";
|
import { act, fireEvent, getByTestId, render, RenderResult, screen } from "@testing-library/react";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,15 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { fireEvent, render, RenderResult } from "@testing-library/react";
|
import { fireEvent, render, RenderResult } from "@testing-library/react";
|
||||||
import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { M_POLL_KIND_DISCLOSED, M_POLL_KIND_UNDISCLOSED, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
Room,
|
||||||
|
MatrixEvent,
|
||||||
|
M_POLL_KIND_DISCLOSED,
|
||||||
|
M_POLL_KIND_UNDISCLOSED,
|
||||||
|
M_POLL_START,
|
||||||
|
M_TEXT,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
|
|
||||||
|
|
||||||
import { getMockClientWithEventEmitter } from "../../../test-utils";
|
import { getMockClientWithEventEmitter } from "../../../test-utils";
|
||||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||||
|
|
|
@ -16,9 +16,8 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
import { RoomMember, RelationType, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import { RoomMember, RelationType, MatrixClient, M_ASSET, LocationAssetType } from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { M_ASSET, LocationAssetType } from "matrix-js-sdk/src/@types/location";
|
|
||||||
import { act, fireEvent, render, RenderResult } from "@testing-library/react";
|
import { act, fireEvent, render, RenderResult } from "@testing-library/react";
|
||||||
import * as maplibregl from "maplibre-gl";
|
import * as maplibregl from "maplibre-gl";
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,12 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
import { ContentHelpers, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import {
|
||||||
import { LegacyLocationEventContent, MLocationEventContent } from "matrix-js-sdk/src/@types/location";
|
ContentHelpers,
|
||||||
|
MatrixClient,
|
||||||
|
LegacyLocationEventContent,
|
||||||
|
MLocationEventContent,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { doMaybeLocalRoomAction } from "../../../../src/utils/local-room";
|
import { doMaybeLocalRoomAction } from "../../../../src/utils/local-room";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -24,8 +24,8 @@ import {
|
||||||
MatrixEvent,
|
MatrixEvent,
|
||||||
EventType,
|
EventType,
|
||||||
Relations,
|
Relations,
|
||||||
|
M_BEACON,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { M_BEACON } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
|
|
||||||
import MBeaconBody from "../../../../src/components/views/messages/MBeaconBody";
|
import MBeaconBody from "../../../../src/components/views/messages/MBeaconBody";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -16,16 +16,17 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { fireEvent, render, RenderResult } from "@testing-library/react";
|
import { fireEvent, render, RenderResult } from "@testing-library/react";
|
||||||
import { MatrixEvent, Relations } from "matrix-js-sdk/src/matrix";
|
|
||||||
import {
|
import {
|
||||||
|
MatrixEvent,
|
||||||
|
Relations,
|
||||||
M_POLL_KIND_DISCLOSED,
|
M_POLL_KIND_DISCLOSED,
|
||||||
M_POLL_KIND_UNDISCLOSED,
|
M_POLL_KIND_UNDISCLOSED,
|
||||||
M_POLL_RESPONSE,
|
M_POLL_RESPONSE,
|
||||||
M_POLL_START,
|
M_POLL_START,
|
||||||
PollStartEventContent,
|
PollStartEventContent,
|
||||||
PollAnswer,
|
PollAnswer,
|
||||||
} from "matrix-js-sdk/src/@types/polls";
|
M_TEXT,
|
||||||
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import MPollBody, { allVotes, findTopAnswer, isPollEnded } from "../../../../src/components/views/messages/MPollBody";
|
import MPollBody, { allVotes, findTopAnswer, isPollEnded } from "../../../../src/components/views/messages/MPollBody";
|
||||||
import { IBodyProps } from "../../../../src/components/views/messages/IBodyProps";
|
import { IBodyProps } from "../../../../src/components/views/messages/IBodyProps";
|
||||||
|
|
|
@ -16,9 +16,8 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { render } from "@testing-library/react";
|
import { render } from "@testing-library/react";
|
||||||
import { EventTimeline, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
import { EventTimeline, MatrixEvent, Room, M_TEXT } from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
|
|
||||||
|
|
||||||
import { IBodyProps } from "../../../../src/components/views/messages/IBodyProps";
|
import { IBodyProps } from "../../../../src/components/views/messages/IBodyProps";
|
||||||
import { MPollEndBody } from "../../../../src/components/views/messages/MPollEndBody";
|
import { MPollEndBody } from "../../../../src/components/views/messages/MPollEndBody";
|
||||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { act, fireEvent, render } from "@testing-library/react";
|
import { act, fireEvent, render } from "@testing-library/react";
|
||||||
import { Filter, EventTimeline, Room, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
import { Filter, EventTimeline, Room, MatrixEvent, M_POLL_START } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
|
|
||||||
import { PollHistory } from "../../../../../src/components/views/polls/pollHistory/PollHistory";
|
import { PollHistory } from "../../../../../src/components/views/polls/pollHistory/PollHistory";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { render } from "@testing-library/react";
|
import { render } from "@testing-library/react";
|
||||||
import { MatrixEvent, Poll, Room } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, Poll, Room, M_TEXT } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
|
|
||||||
|
|
||||||
import { PollListItemEnded } from "../../../../../src/components/views/polls/pollHistory/PollListItemEnded";
|
import { PollListItemEnded } from "../../../../../src/components/views/polls/pollHistory/PollListItemEnded";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import {
|
||||||
Room,
|
Room,
|
||||||
MatrixClient,
|
MatrixClient,
|
||||||
PendingEventOrdering,
|
PendingEventOrdering,
|
||||||
|
ReceiptType,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import LegacyRoomHeaderButtons from "../../../../src/components/views/right_panel/LegacyRoomHeaderButtons";
|
import LegacyRoomHeaderButtons from "../../../../src/components/views/right_panel/LegacyRoomHeaderButtons";
|
||||||
|
|
|
@ -27,8 +27,8 @@ import {
|
||||||
EventType,
|
EventType,
|
||||||
RelationType,
|
RelationType,
|
||||||
MsgType,
|
MsgType,
|
||||||
|
M_POLL_KIND_DISCLOSED,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/src/@types/polls";
|
|
||||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||||
import { PollResponseEvent } from "matrix-js-sdk/src/extensible_events_v1/PollResponseEvent";
|
import { PollResponseEvent } from "matrix-js-sdk/src/extensible_events_v1/PollResponseEvent";
|
||||||
import { PollEndEvent } from "matrix-js-sdk/src/extensible_events_v1/PollEndEvent";
|
import { PollEndEvent } from "matrix-js-sdk/src/extensible_events_v1/PollEndEvent";
|
||||||
|
|
|
@ -25,8 +25,8 @@ import {
|
||||||
Room,
|
Room,
|
||||||
EventStatus,
|
EventStatus,
|
||||||
PendingEventOrdering,
|
PendingEventOrdering,
|
||||||
|
ReceiptType,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
|
|
||||||
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
|
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
import { mkThread } from "../../../../test-utils/threads";
|
import { mkThread } from "../../../../test-utils/threads";
|
||||||
|
|
|
@ -27,9 +27,10 @@ import {
|
||||||
ConditionKind,
|
ConditionKind,
|
||||||
IPushRuleCondition,
|
IPushRuleCondition,
|
||||||
PushRuleKind,
|
PushRuleKind,
|
||||||
|
IThreepid,
|
||||||
|
ThreepidMedium,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { randomString } from "matrix-js-sdk/src/randomstring";
|
import { randomString } from "matrix-js-sdk/src/randomstring";
|
||||||
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
|
||||||
import { act, fireEvent, getByTestId, render, screen, waitFor, within } from "@testing-library/react";
|
import { act, fireEvent, getByTestId, render, screen, waitFor, within } from "@testing-library/react";
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
|
|
|
@ -18,7 +18,7 @@ import { cleanup, render, waitFor } from "@testing-library/react";
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { MSC3906Rendezvous, RendezvousFailureReason } from "matrix-js-sdk/src/rendezvous";
|
import { MSC3906Rendezvous, RendezvousFailureReason } from "matrix-js-sdk/src/rendezvous";
|
||||||
import { LoginTokenPostResponse } from "matrix-js-sdk/src/@types/auth";
|
import { LoginTokenPostResponse } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import LoginWithQR, { Click, Mode, Phase } from "../../../../../src/components/views/auth/LoginWithQR";
|
import LoginWithQR, { Click, Mode, Phase } from "../../../../../src/components/views/auth/LoginWithQR";
|
||||||
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
|
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { fireEvent, render, screen } from "@testing-library/react";
|
import { fireEvent, render, screen } from "@testing-library/react";
|
||||||
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
import { IThreepid, ThreepidMedium, IRequestTokenResponse, MatrixError } from "matrix-js-sdk/src/matrix";
|
||||||
import { IRequestTokenResponse, MatrixError } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import { TranslationKey, UserFriendlyError } from "../../../../../src/languageHandler";
|
import { TranslationKey, UserFriendlyError } from "../../../../../src/languageHandler";
|
||||||
import EmailAddresses, { EmailAddress } from "../../../../../src/components/views/settings/discovery/EmailAddresses";
|
import EmailAddresses, { EmailAddress } from "../../../../../src/components/views/settings/discovery/EmailAddresses";
|
||||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
||||||
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/matrix";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
import { mocked } from "jest-mock";
|
import { mocked } from "jest-mock";
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,15 @@ limitations under the License.
|
||||||
|
|
||||||
import { act, findByRole, getByRole, queryByRole, render, waitFor } from "@testing-library/react";
|
import { act, findByRole, getByRole, queryByRole, render, waitFor } from "@testing-library/react";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
import { ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
import {
|
||||||
import { IPushRules, MatrixClient, NotificationCountType, PushRuleKind, Room, RuleId } from "matrix-js-sdk/src/matrix";
|
ThreepidMedium,
|
||||||
|
IPushRules,
|
||||||
|
MatrixClient,
|
||||||
|
NotificationCountType,
|
||||||
|
PushRuleKind,
|
||||||
|
Room,
|
||||||
|
RuleId,
|
||||||
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import NotificationSettings2 from "../../../../../src/components/views/settings/notifications/NotificationSettings2";
|
import NotificationSettings2 from "../../../../../src/components/views/settings/notifications/NotificationSettings2";
|
||||||
|
|
|
@ -13,9 +13,8 @@ limitations under the License.
|
||||||
|
|
||||||
import { fireEvent, render, screen, within } from "@testing-library/react";
|
import { fireEvent, render, screen, within } from "@testing-library/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { M_AUTHENTICATION } from "matrix-js-sdk/src/matrix";
|
import { M_AUTHENTICATION, ThreepidMedium } from "matrix-js-sdk/src/matrix";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
|
|
||||||
|
|
||||||
import GeneralUserSettingsTab from "../../../../../../src/components/views/settings/tabs/user/GeneralUserSettingsTab";
|
import GeneralUserSettingsTab from "../../../../../../src/components/views/settings/tabs/user/GeneralUserSettingsTab";
|
||||||
import MatrixClientContext from "../../../../../../src/contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../../../../src/contexts/MatrixClientContext";
|
||||||
|
|
|
@ -23,8 +23,8 @@ import {
|
||||||
RoomStateEvent,
|
RoomStateEvent,
|
||||||
RoomMember,
|
RoomMember,
|
||||||
ContentHelpers,
|
ContentHelpers,
|
||||||
|
M_BEACON,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { M_BEACON } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { Mocked } from "jest-mock";
|
import { Mocked } from "jest-mock";
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,9 @@ import {
|
||||||
getBeaconInfoIdentifier,
|
getBeaconInfoIdentifier,
|
||||||
ContentHelpers,
|
ContentHelpers,
|
||||||
LocationAssetType,
|
LocationAssetType,
|
||||||
|
M_BEACON,
|
||||||
|
M_BEACON_INFO,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { M_BEACON, M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
|
|
||||||
|
|
||||||
import { getMockGeolocationPositionError } from "./location";
|
import { getMockGeolocationPositionError } from "./location";
|
||||||
import { makeRoomWithStateEvents } from "./room";
|
import { makeRoomWithStateEvents } from "./room";
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { LocationAssetType, M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
import { LocationAssetType, M_LOCATION, MatrixEvent, EventType, ContentHelpers } from "matrix-js-sdk/src/matrix";
|
||||||
import { MatrixEvent, EventType, ContentHelpers } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
let id = 1;
|
let id = 1;
|
||||||
export const makeLegacyLocationEvent = (geoUri: string): MatrixEvent => {
|
export const makeLegacyLocationEvent = (geoUri: string): MatrixEvent => {
|
||||||
|
|
|
@ -15,15 +15,17 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Mocked } from "jest-mock";
|
import { Mocked } from "jest-mock";
|
||||||
import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
|
||||||
import {
|
import {
|
||||||
|
MatrixClient,
|
||||||
|
MatrixEvent,
|
||||||
|
Room,
|
||||||
M_POLL_START,
|
M_POLL_START,
|
||||||
PollAnswer,
|
PollAnswer,
|
||||||
M_POLL_KIND_DISCLOSED,
|
M_POLL_KIND_DISCLOSED,
|
||||||
M_POLL_END,
|
M_POLL_END,
|
||||||
M_POLL_RESPONSE,
|
M_POLL_RESPONSE,
|
||||||
} from "matrix-js-sdk/src/@types/polls";
|
M_TEXT,
|
||||||
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { uuid4 } from "@sentry/utils";
|
import { uuid4 } from "@sentry/utils";
|
||||||
|
|
||||||
import { flushPromises } from "./utilities";
|
import { flushPromises } from "./utilities";
|
||||||
|
|
|
@ -36,13 +36,13 @@ import {
|
||||||
IPushRules,
|
IPushRules,
|
||||||
RelationType,
|
RelationType,
|
||||||
JoinRule,
|
JoinRule,
|
||||||
|
IEventDecryptionResult,
|
||||||
} from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
import { normalize } from "matrix-js-sdk/src/utils";
|
import { normalize } from "matrix-js-sdk/src/utils";
|
||||||
import { ReEmitter } from "matrix-js-sdk/src/ReEmitter";
|
import { ReEmitter } from "matrix-js-sdk/src/ReEmitter";
|
||||||
import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler";
|
import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler";
|
||||||
import { Feature, ServerSupport } from "matrix-js-sdk/src/feature";
|
import { Feature, ServerSupport } from "matrix-js-sdk/src/feature";
|
||||||
import { CryptoBackend } from "matrix-js-sdk/src/common-crypto/CryptoBackend";
|
import { CryptoBackend } from "matrix-js-sdk/src/common-crypto/CryptoBackend";
|
||||||
import { IEventDecryptionResult } from "matrix-js-sdk/src/@types/crypto";
|
|
||||||
import { MapperOpts } from "matrix-js-sdk/src/event-mapper";
|
import { MapperOpts } from "matrix-js-sdk/src/event-mapper";
|
||||||
|
|
||||||
import type { GroupCall } from "matrix-js-sdk/src/matrix";
|
import type { GroupCall } from "matrix-js-sdk/src/matrix";
|
||||||
|
|
|
@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
|
||||||
import {
|
import {
|
||||||
|
M_LOCATION,
|
||||||
EventStatus,
|
EventStatus,
|
||||||
EventType,
|
EventType,
|
||||||
IEvent,
|
IEvent,
|
||||||
|
|
|
@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { M_TIMESTAMP } from "matrix-js-sdk/src/@types/location";
|
import { M_TIMESTAMP, Beacon } from "matrix-js-sdk/src/matrix";
|
||||||
import { Beacon } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import { msUntilExpiry, sortBeaconsByLatestExpiry, sortBeaconsByLatestCreation } from "../../../src/utils/beacon";
|
import { msUntilExpiry, sortBeaconsByLatestExpiry, sortBeaconsByLatestCreation } from "../../../src/utils/beacon";
|
||||||
import { makeBeaconInfoEvent } from "../../test-utils";
|
import { makeBeaconInfoEvent } from "../../test-utils";
|
||||||
|
|
|
@ -14,15 +14,15 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { M_TEXT } from "matrix-js-sdk/src/@types/extensible_events";
|
|
||||||
import {
|
import {
|
||||||
|
M_TEXT,
|
||||||
ILocationContent,
|
ILocationContent,
|
||||||
LocationAssetType,
|
LocationAssetType,
|
||||||
M_ASSET,
|
M_ASSET,
|
||||||
M_LOCATION,
|
M_LOCATION,
|
||||||
M_TIMESTAMP,
|
M_TIMESTAMP,
|
||||||
} from "matrix-js-sdk/src/@types/location";
|
ContentHelpers,
|
||||||
import { ContentHelpers } from "matrix-js-sdk/src/matrix";
|
} from "matrix-js-sdk/src/matrix";
|
||||||
|
|
||||||
import { isSelfLocation } from "../../../src/utils/location";
|
import { isSelfLocation } from "../../../src/utils/location";
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixEvent, NotificationCountType, Room, MatrixClient } from "matrix-js-sdk/src/matrix";
|
import { MatrixEvent, NotificationCountType, Room, MatrixClient, ReceiptType } from "matrix-js-sdk/src/matrix";
|
||||||
import { Mocked, mocked } from "jest-mock";
|
import { Mocked, mocked } from "jest-mock";
|
||||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
localNotificationsAreSilenced,
|
localNotificationsAreSilenced,
|
||||||
|
|
|
@ -15,8 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Mocked } from "jest-mock";
|
import { Mocked } from "jest-mock";
|
||||||
import { IIdentityServerProvider } from "matrix-js-sdk/src/@types/IIdentityServerProvider";
|
import { IIdentityServerProvider, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import { DirectoryMember, ThreepidMember } from "../../src/utils/direct-messages";
|
import { DirectoryMember, ThreepidMember } from "../../src/utils/direct-messages";
|
||||||
import { lookupThreePids, resolveThreePids } from "../../src/utils/threepids";
|
import { lookupThreePids, resolveThreePids } from "../../src/utils/threepids";
|
||||||
|
|
Loading…
Reference in a new issue