React with arbitrary strings via /react

This commit is contained in:
Nicolas Werner 2020-12-13 16:23:04 +01:00
parent 703950273b
commit 7abeb1f1a4

View file

@ -21,6 +21,7 @@
#include "MatrixClient.h" #include "MatrixClient.h"
#include "Olm.h" #include "Olm.h"
#include "TimelineModel.h" #include "TimelineModel.h"
#include "TimelineViewManager.h"
#include "UserSettingsPage.h" #include "UserSettingsPage.h"
#include "UsersModel.h" #include "UsersModel.h"
#include "Utils.h" #include "Utils.h"
@ -433,6 +434,11 @@ InputBar::command(QString command, QString args)
{ {
if (command == "me") { if (command == "me") {
emote(args); emote(args);
} else if (command == "react") {
auto eventId = room->reply();
if (!eventId.isEmpty())
ChatPage::instance()->timelineManager()->queueReactionMessage(
eventId, args.trimmed());
} else if (command == "join") { } else if (command == "join") {
ChatPage::instance()->joinRoom(args); ChatPage::instance()->joinRoom(args);
} else if (command == "invite") { } else if (command == "invite") {