Add new tests for WysiwygComposer
This commit is contained in:
parent
c9bf7da629
commit
50c29502e4
11 changed files with 774 additions and 357 deletions
|
@ -54,8 +54,8 @@ export function createMessageContent(
|
|||
): IContent {
|
||||
// TODO emote ?
|
||||
|
||||
const isReply = Boolean(replyToEvent?.replyEventId);
|
||||
const isEditing = Boolean(editedEvent);
|
||||
const isReply = isEditing ? Boolean(editedEvent?.replyEventId) : Boolean(replyToEvent);
|
||||
|
||||
/*const isEmote = containsEmote(model);
|
||||
if (isEmote) {
|
||||
|
@ -87,7 +87,7 @@ export function createMessageContent(
|
|||
if (formattedBody) {
|
||||
content.format = "org.matrix.custom.html";
|
||||
|
||||
const htmlPrefix = isReply ? getHtmlReplyFallback(editedEvent) : '';
|
||||
const htmlPrefix = isReply && isEditing ? getHtmlReplyFallback(editedEvent) : '';
|
||||
content.formatted_body = isEditing ? `${htmlPrefix} * ${formattedBody}` : formattedBody;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue