mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-25 00:11:43 +02:00
Merge pull request #885 from matrix-org/t3chguy/rte_emote_weirdness
remove /me whether or not it has a space after it
This commit is contained in:
commit
24d09d8f5b
@ -542,9 +542,9 @@ export default class MessageComposerInput extends React.Component {
|
|||||||
let sendTextFn = this.client.sendTextMessage;
|
let sendTextFn = this.client.sendTextMessage;
|
||||||
|
|
||||||
if (contentText.startsWith('/me')) {
|
if (contentText.startsWith('/me')) {
|
||||||
contentText = contentText.replace('/me ', '');
|
contentText = contentText.substring(4);
|
||||||
// bit of a hack, but the alternative would be quite complicated
|
// bit of a hack, but the alternative would be quite complicated
|
||||||
if (contentHTML) contentHTML = contentHTML.replace('/me ', '');
|
if (contentHTML) contentHTML = contentHTML.replace(/\/me ?/, '');
|
||||||
sendHtmlFn = this.client.sendHtmlEmote;
|
sendHtmlFn = this.client.sendHtmlEmote;
|
||||||
sendTextFn = this.client.sendEmoteMessage;
|
sendTextFn = this.client.sendEmoteMessage;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user