Skip to content
Snippets Groups Projects
Commit a66046aa authored by Mayeul Cantan's avatar Mayeul Cantan
Browse files

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.
parent 80474426
No related branches found
No related tags found
No related merge requests found
...@@ -703,7 +703,7 @@ TextInputWidget::command(QString command, QString args) ...@@ -703,7 +703,7 @@ TextInputWidget::command(QString command, QString args)
} else if (command == "roomnick") { } else if (command == "roomnick") {
emit changeRoomNick(args); emit changeRoomNick(args);
} else if (command == "shrug") { } else if (command == "shrug") {
emit sendTextMessage(\\_(ツ)_/¯"); emit sendTextMessage(\\_(ツ)_/¯" + (args.isEmpty() ? "" : " " + args));
} else if (command == "fliptable") { } else if (command == "fliptable") {
emit sendTextMessage("(╯°□°)╯︵ ┻━┻"); emit sendTextMessage("(╯°□°)╯︵ ┻━┻");
} else if (command == "unfliptable") { } else if (command == "unfliptable") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment