Files
ThreadNet-Web/src/components/views/messages/IBodyProps.ts
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.9 KiB
TypeScript
Raw Normal View History

2021-07-16 10:57:14 -06:00
/*
2024-09-09 14:57:16 +01:00
Copyright 2024 New Vector Ltd.
2021-07-16 10:57:14 -06:00
Copyright 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
2024-09-09 14:57:16 +01:00
Please see LICENSE files in the repository root for full details.
2021-07-16 10:57:14 -06:00
*/
2025-02-05 13:25:06 +00:00
import { type LegacyRef } from "react";
import { type MatrixEvent } from "matrix-js-sdk/src/matrix";
2021-12-09 09:10:23 +00:00
2025-02-05 13:25:06 +00:00
import type React from "react";
import { type MediaEventHelper } from "../../../utils/MediaEventHelper";
import type EditorStateTransfer from "../../../utils/EditorStateTransfer";
import { type RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks";
import { type GetRelationsForEvent } from "../rooms/EventTile";
2021-07-16 10:57:14 -06:00
export interface IBodyProps {
mxEvent: MatrixEvent;
/* a list of words to highlight */
highlights?: string[];
2021-07-16 10:57:14 -06:00
/* link URL for the highlights */
highlightLink?: string;
2021-07-16 10:57:14 -06:00
/* callback called when dynamic content in events are loaded */
onHeightChanged?: () => void;
2021-07-16 10:57:14 -06:00
showUrlPreview?: boolean;
2021-07-21 11:35:27 +05:30
forExport?: boolean;
2021-07-16 10:57:14 -06:00
maxImageHeight?: number;
replacingEventId?: string;
editState?: EditorStateTransfer;
2023-07-07 13:37:26 +01:00
onMessageAllowed?: () => void; // TODO: Docs
permalinkCreator?: RoomPermalinkCreator;
2023-07-07 13:37:26 +01:00
mediaEventHelper?: MediaEventHelper;
2021-11-23 10:27:44 +00:00
/*
If present and `true`, the message has been marked as hidden pending moderation
(see MSC3531) **but** the current user can see the message nevertheless (with
a marker), either because they are a moderator or because they are the original
author of the message.
*/
isSeeingThroughMessageHiddenForModeration?: boolean;
2021-11-23 10:27:44 +00:00
// helper function to access relations for this event
getRelationsForEvent?: GetRelationsForEvent;
ref?: React.RefObject<any> | LegacyRef<any>;
// Set to `true` to disable interactions (e.g. video controls) and to remove controls from the tab order.
// This may be useful when displaying a preview of the event.
inhibitInteraction?: boolean;
2021-07-16 10:57:14 -06:00
}