diff --git a/src/components/views/context_menus/MessageContextMenu.tsx b/src/components/views/context_menus/MessageContextMenu.tsx index 71a35ba6a1..2b39f9f717 100644 --- a/src/components/views/context_menus/MessageContextMenu.tsx +++ b/src/components/views/context_menus/MessageContextMenu.tsx @@ -39,6 +39,7 @@ import ShareDialog from '../dialogs/ShareDialog'; import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; import { IPosition, ChevronFace } from '../../structures/ContextMenu'; import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext'; +import { ComposerInsertPayload } from "../../../dispatcher/payloads/ComposerInsertPayload"; export function canCancel(eventStatus: EventStatus): boolean { return eventStatus === EventStatus.QUEUED || eventStatus === EventStatus.NOT_SENT; @@ -76,6 +77,7 @@ interface IState { @replaceableComponent("views.context_menus.MessageContextMenu") export default class MessageContextMenu extends React.Component { static contextType = RoomContext; + public context!: React.ContextType; state = { canRedact: false, @@ -190,9 +192,10 @@ export default class MessageContextMenu extends React.Component }; private onQuoteClick = (): void => { - dis.dispatch({ + dis.dispatch({ action: Action.ComposerInsert, event: this.props.mxEvent, + timelineRenderingType: this.context.timelineRenderingType, }); this.closeMenu(); };