summary refs log tree commit diff
path: root/src/timeline/InputBar.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-12-13 16:23:04 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-12-13 16:23:04 +0100
commit7abeb1f1a46615a4d970694d8de15cf8cfbb8567 (patch)
treea29203ed6a0027266bd44b5027e532f3a27c539c /src/timeline/InputBar.cpp
parentDon't overflow room name (diff)
downloadnheko-7abeb1f1a46615a4d970694d8de15cf8cfbb8567.tar.xz
React with arbitrary strings via /react
Diffstat (limited to 'src/timeline/InputBar.cpp')
-rw-r--r--src/timeline/InputBar.cpp6
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") {