From c697b48f99f21f1da8427d38ff961becffb73d54 Mon Sep 17 00:00:00 2001 From: Lieuwe Rooijakkers Date: Sun, 19 Mar 2017 21:52:24 +0100 Subject: [PATCH 1/2] fix leading extraneous space in emotes --- src/components/views/rooms/MessageComposerInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index d702b7558d..60088ddd6f 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -541,7 +541,7 @@ export default class MessageComposerInput extends React.Component { let sendTextFn = this.client.sendTextMessage; if (contentText.startsWith('/me')) { - contentText = contentText.replace('/me', ''); + contentText = contentText.replace('/me ', ''); // bit of a hack, but the alternative would be quite complicated if (contentHTML) contentHTML = contentHTML.replace('/me', ''); sendHtmlFn = this.client.sendHtmlEmote; From bf8973ad33b62b9ef88007d6a1d13a1408130e37 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 19 Mar 2017 21:33:18 +0000 Subject: [PATCH 2/2] avoid leading space in HTML /me too --- src/components/views/rooms/MessageComposerInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 60088ddd6f..51c9ba881b 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -543,7 +543,7 @@ export default class MessageComposerInput extends React.Component { if (contentText.startsWith('/me')) { contentText = contentText.replace('/me ', ''); // 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; sendTextFn = this.client.sendEmoteMessage; }