Allow sending text after `shrug`

¯\_(ツ)_/¯ IDK, I like to write something after, sometimes

Allow sending:

¯\_(ツ)_/¯ some text

By entering:

/shrug some text

It's supported in Element. If you did it in nheko, you just used to lose the
extra text.

Not putting text is still supported, a ternary operator makes sure a
space is only inserted if the text isn't empty, to avoid having a trailing
space.
This commit is contained in:
Mayeul Cantan 2020-10-31 23:05:13 +01:00
parent 8047442661
commit a66046aaf0
1 changed files with 1 additions and 1 deletions

View File

@ -703,7 +703,7 @@ TextInputWidget::command(QString command, QString args)
} else if (command == "roomnick") {
emit changeRoomNick(args);
} else if (command == "shrug") {
emit sendTextMessage("¯\\_(ツ)_/¯");
emit sendTextMessage("¯\\_(ツ)_/¯" + (args.isEmpty() ? "" : " " + args));
} else if (command == "fliptable") {
emit sendTextMessage("(╯°□°) ");
} else if (command == "unfliptable") {