aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-30 07:53:34 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-31 11:28:12 +0900
commit1ea94b918569dd26452f285c408e605f9dc15343 (patch)
treefdcb7485f190da3a8028326fb4acffb537841e20
parentb89d5c43746ed672d98bf350db2a9e1b0878e2d0 (diff)
downloadlibquotient-1ea94b918569dd26452f285c408e605f9dc15343.tar.gz
libquotient-1ea94b918569dd26452f285c408e605f9dc15343.zip
Room::postReaction()
-rw-r--r--lib/room.cpp5
-rw-r--r--lib/room.h2
2 files changed, 7 insertions, 0 deletions
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<ReactionEvent>(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