chat: require and remove leading space for /me

Closes #2834. Previously, starting a message with '/me' removed itself,
retaining the space between it and the message itself; it also allowed
"/memessages" to be processed as /me messages.
This commit is contained in:
Matilde Park 2020-05-04 12:41:06 -04:00
parent 03d80b8c63
commit 40378d2b79

View File

@ -151,8 +151,8 @@ export class ChatInput extends Component {
}
getLetterType(letter) {
if (letter.startsWith('/me')) {
letter = letter.slice(3);
if (letter.startsWith('/me ')) {
letter = letter.slice(4);
// remove insignificant leading whitespace.
// aces might be relevant to style.
while (letter[0] === '\n') {