Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix extraneous leading space in sent emotes #764

Merged
merged 2 commits into from
Mar 19, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/views/rooms/MessageComposerInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see I missed this one, I'm not sure if it's needed for the HTML though, since I think that HTML collapses multiple spaces.

sendHtmlFn = this.client.sendHtmlEmote;
Expand Down