mirror of https://github.com/vector-im/riot-web
Always store sent MD messages as MD in history
Because converting them to HTML when they got sent as HTML seems a bit pointless when they're just going to get transformed back again when retrieved from history. Fixes regression https://github.com/vector-im/riot-web/issues/4465pull/21833/head
parent
1cfc2773ea
commit
6bc40a112c
|
@ -556,9 +556,15 @@ export default class MessageComposerInput extends React.Component {
|
||||||
sendTextFn = this.client.sendEmoteMessage;
|
sendTextFn = this.client.sendEmoteMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.historyManager.addItem(
|
if (this.state.isRichtextEnabled) {
|
||||||
contentHTML ? contentHTML : contentText,
|
this.historyManager.addItem(
|
||||||
contentHTML ? 'html' : 'markdown');
|
contentHTML ? contentHTML : contentText,
|
||||||
|
contentHTML ? 'html' : 'markdown',
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// Always store MD input as input history
|
||||||
|
this.historyManager.addItem(contentText, 'markdown');
|
||||||
|
}
|
||||||
|
|
||||||
let sendMessagePromise;
|
let sendMessagePromise;
|
||||||
if (contentHTML) {
|
if (contentHTML) {
|
||||||
|
|
Loading…
Reference in New Issue