mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 22:14:58 +08:00
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
This commit is contained in:
parent
1cfc2773ea
commit
6bc40a112c
@ -556,9 +556,15 @@ export default class MessageComposerInput extends React.Component {
|
||||
sendTextFn = this.client.sendEmoteMessage;
|
||||
}
|
||||
|
||||
if (this.state.isRichtextEnabled) {
|
||||
this.historyManager.addItem(
|
||||
contentHTML ? contentHTML : contentText,
|
||||
contentHTML ? 'html' : 'markdown');
|
||||
contentHTML ? 'html' : 'markdown',
|
||||
);
|
||||
} else {
|
||||
// Always store MD input as input history
|
||||
this.historyManager.addItem(contentText, 'markdown');
|
||||
}
|
||||
|
||||
let sendMessagePromise;
|
||||
if (contentHTML) {
|
||||
|
Loading…
Reference in New Issue
Block a user