Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
use local text over import from current composer
Browse files Browse the repository at this point in the history
  • Loading branch information
Alun Turner committed Apr 5, 2023
1 parent da5dd7c commit 479ceb1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/views/rooms/wysiwyg_composer/utils/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@ import { createMessageContent } from "./createMessageContent";
import { isContentModified } from "./isContentModified";
import { CommandCategories, getCommand } from "../../../../../SlashCommands";
import { runSlashCommand, shouldSendAnyway } from "../../../../../editor/commands";
import { attachRelation } from "../../SendMessageComposer";
import { Action } from "../../../../../dispatcher/actions";
import { addReplyToMessageContent } from "../../../../../utils/Reply";

// Merges favouring the given relation - taken from SendMessageComposer to avoid another import
function attachRelation(content: IContent, relation?: IEventRelation): void {
if (relation) {
content["m.relates_to"] = {
...(content["m.relates_to"] || {}),
...relation,
};
}
}
export interface SendMessageParams {
mxClient: MatrixClient;
relation?: IEventRelation;
Expand Down

0 comments on commit 479ceb1

Please sign in to comment.