diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-12-13 16:23:04 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-12-13 16:23:04 +0100 |
commit | 7abeb1f1a46615a4d970694d8de15cf8cfbb8567 (patch) | |
tree | a29203ed6a0027266bd44b5027e532f3a27c539c | |
parent | Don't overflow room name (diff) | |
download | nheko-7abeb1f1a46615a4d970694d8de15cf8cfbb8567.tar.xz |
React with arbitrary strings via /react
-rw-r--r-- | src/timeline/InputBar.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index 853fb262..5cbc33e0 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp @@ -21,6 +21,7 @@ #include "MatrixClient.h" #include "Olm.h" #include "TimelineModel.h" +#include "TimelineViewManager.h" #include "UserSettingsPage.h" #include "UsersModel.h" #include "Utils.h" @@ -433,6 +434,11 @@ InputBar::command(QString command, QString args) { if (command == "me") { emote(args); + } else if (command == "react") { + auto eventId = room->reply(); + if (!eventId.isEmpty()) + ChatPage::instance()->timelineManager()->queueReactionMessage( + eventId, args.trimmed()); } else if (command == "join") { ChatPage::instance()->joinRoom(args); } else if (command == "invite") { |