From 1ea94b918569dd26452f285c408e605f9dc15343 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 30 Jul 2019 07:53:34 +0900 Subject: Room::postReaction() --- lib/room.cpp | 5 +++++ lib/room.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/room.cpp b/lib/room.cpp index 8b05568a..6519db12 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1603,6 +1603,11 @@ QString Room::postHtmlText(const QString& plainText, const QString& html) return postHtmlMessage(plainText, html); } +QString Room::postReaction(const QString& eventId, const QString& key) +{ + return d->sendEvent(EventRelation::annotate(eventId, key)); +} + QString Room::postFile(const QString& plainText, const QUrl& localPath, bool asGenericFile) { diff --git a/lib/room.h b/lib/room.h index 65b9070a..470bb7f9 100644 --- a/lib/room.h +++ b/lib/room.h @@ -430,6 +430,8 @@ namespace QMatrixClient const QString& html, MessageEventType type = MessageEventType::Text); QString postHtmlText(const QString& plainText, const QString& html); + /// Send a reaction on a given event with a given key + QString postReaction(const QString& eventId, const QString& key); QString postFile(const QString& plainText, const QUrl& localPath, bool asGenericFile = false); /** Post a pre-created room message event -- cgit v1.2.3