Consume more imports from matrix-js-sdk/src/matrix (#11449)

This commit is contained in:
Michael Telatynski 2023-08-23 10:04:25 +01:00 committed by GitHub
parent aa6e3654b8
commit 99e80dd296
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
89 changed files with 236 additions and 172 deletions

View file

@ -14,9 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { MatrixEvent, IContent, MatrixClient, EventType, MsgType } from "matrix-js-sdk/src/matrix";
import { M_POLL_END, M_POLL_START } from "matrix-js-sdk/src/@types/polls";
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
import {
MatrixEvent,
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 { haveRendererForEvent, JitsiEventFactory, JSONEventFactory, pickFactory } from "../events/EventTileFactory";

View file

@ -23,11 +23,12 @@ import {
RelationType,
MatrixClient,
THREAD_RELATION_TYPE,
M_POLL_END,
M_POLL_START,
M_LOCATION,
M_BEACON_INFO,
} from "matrix-js-sdk/src/matrix";
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 { GetRelationsForEvent } from "../components/views/rooms/EventTile";

View file

@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
import { MatrixEvent, EventType, M_POLL_START } from "matrix-js-sdk/src/matrix";
export default class PinningUtils {
/**

View file

@ -15,11 +15,18 @@
* 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 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 { PERMITTED_URL_SCHEMES } from "./UrlUtils";

View file

@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
import { MatrixEvent, M_BEACON_INFO } from "matrix-js-sdk/src/matrix";
/**
* beacon_info events without live property set to true

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
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 => {
const asset = M_ASSET.findIn(locationContent) as { type: string };

View file

@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
import { MatrixEvent, M_LOCATION } from "matrix-js-sdk/src/matrix";
/**
* Find the geo-URI contained within a location event.

View file

@ -15,8 +15,7 @@ limitations under the License.
*/
import * as maplibregl from "maplibre-gl";
import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
import { MatrixClient, MatrixEvent, M_LOCATION } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { _t } from "../../languageHandler";

View file

@ -19,9 +19,9 @@ import {
LOCAL_NOTIFICATION_SETTINGS_PREFIX,
NotificationCountType,
Room,
LocalNotificationSettings,
ReceiptType,
} 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";