Merge pull request #764 from lieuwex/fix-extraneous-space-emote

Fix extraneous leading space in sent emotes
pull/21833/head
Matthew Hodgson 2017-03-19 21:34:13 +00:00 committed by GitHub
commit f65cc940c3
1 changed files with 2 additions and 2 deletions

View File

@ -541,9 +541,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.replace('/me ', '');
// 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;
} }