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/4465
pull/21833/head
Luke Barnard 2017-06-30 15:45:10 +01:00
parent 1cfc2773ea
commit 6bc40a112c
1 changed files with 9 additions and 3 deletions

View File

@ -556,9 +556,15 @@ export default class MessageComposerInput extends React.Component {
sendTextFn = this.client.sendEmoteMessage;
}
this.historyManager.addItem(
contentHTML ? contentHTML : contentText,
contentHTML ? 'html' : 'markdown');
if (this.state.isRichtextEnabled) {
this.historyManager.addItem(
contentHTML ? contentHTML : contentText,
contentHTML ? 'html' : 'markdown',
);
} else {
// Always store MD input as input history
this.historyManager.addItem(contentText, 'markdown');
}
let sendMessagePromise;
if (contentHTML) {