From 7abeb1f1a46615a4d970694d8de15cf8cfbb8567 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 13 Dec 2020 16:23:04 +0100 Subject: [PATCH] React with arbitrary strings via /react --- src/timeline/InputBar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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") {