Replace eventIsReply util with replyEventId getter
This commit is contained in:
parent
855c3819c1
commit
dca268e67a
1 changed files with 1 additions and 6 deletions
|
@ -43,11 +43,6 @@ import QuestionDialog from "../dialogs/QuestionDialog";
|
||||||
import { ActionPayload } from "../../../dispatcher/payloads";
|
import { ActionPayload } from "../../../dispatcher/payloads";
|
||||||
import AccessibleButton from '../elements/AccessibleButton';
|
import AccessibleButton from '../elements/AccessibleButton';
|
||||||
|
|
||||||
function eventIsReply(mxEvent: MatrixEvent): boolean {
|
|
||||||
const relatesTo = mxEvent.getContent()["m.relates_to"];
|
|
||||||
return !!(relatesTo && relatesTo["m.in_reply_to"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getHtmlReplyFallback(mxEvent: MatrixEvent): string {
|
function getHtmlReplyFallback(mxEvent: MatrixEvent): string {
|
||||||
const html = mxEvent.getContent().formatted_body;
|
const html = mxEvent.getContent().formatted_body;
|
||||||
if (!html) {
|
if (!html) {
|
||||||
|
@ -72,7 +67,7 @@ function createEditContent(model: EditorModel, editedEvent: MatrixEvent): IConte
|
||||||
if (isEmote) {
|
if (isEmote) {
|
||||||
model = stripEmoteCommand(model);
|
model = stripEmoteCommand(model);
|
||||||
}
|
}
|
||||||
const isReply = eventIsReply(editedEvent);
|
const isReply = !!editedEvent.replyEventId;
|
||||||
let plainPrefix = "";
|
let plainPrefix = "";
|
||||||
let htmlPrefix = "";
|
let htmlPrefix = "";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue