add * to fallback messages for edits
parent
b081a3156f
commit
6366371c0d
|
@ -110,9 +110,15 @@ export default class MessageEditor extends React.Component {
|
||||||
"msgtype": "m.text",
|
"msgtype": "m.text",
|
||||||
"body": textSerialize(this.model),
|
"body": textSerialize(this.model),
|
||||||
};
|
};
|
||||||
|
const contentBody = {
|
||||||
|
msgtype: newContent.msgtype,
|
||||||
|
body: ` * ${newContent.body}`,
|
||||||
|
};
|
||||||
if (requiresHtml(this.model)) {
|
if (requiresHtml(this.model)) {
|
||||||
newContent.format = "org.matrix.custom.html";
|
newContent.format = "org.matrix.custom.html";
|
||||||
newContent.formatted_body = htmlSerialize(this.model);
|
newContent.formatted_body = htmlSerialize(this.model);
|
||||||
|
contentBody.format = newContent.format;
|
||||||
|
contentBody.formatted_body = ` * ${newContent.formatted_body}`;
|
||||||
}
|
}
|
||||||
const content = Object.assign({
|
const content = Object.assign({
|
||||||
"m.new_content": newContent,
|
"m.new_content": newContent,
|
||||||
|
@ -120,7 +126,7 @@ export default class MessageEditor extends React.Component {
|
||||||
"rel_type": "m.replace",
|
"rel_type": "m.replace",
|
||||||
"event_id": this.props.event.getId(),
|
"event_id": this.props.event.getId(),
|
||||||
},
|
},
|
||||||
}, newContent);
|
}, contentBody);
|
||||||
|
|
||||||
const roomId = this.props.event.getRoomId();
|
const roomId = this.props.event.getRoomId();
|
||||||
this.context.matrixClient.sendMessage(roomId, content);
|
this.context.matrixClient.sendMessage(roomId, content);
|
||||||
|
|
Loading…
Reference in New Issue