diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-07-30 07:53:34 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-07-31 11:28:12 +0900 |
commit | 1ea94b918569dd26452f285c408e605f9dc15343 (patch) | |
tree | fdcb7485f190da3a8028326fb4acffb537841e20 | |
parent | b89d5c43746ed672d98bf350db2a9e1b0878e2d0 (diff) | |
download | libquotient-1ea94b918569dd26452f285c408e605f9dc15343.tar.gz libquotient-1ea94b918569dd26452f285c408e605f9dc15343.zip |
Room::postReaction()
-rw-r--r-- | lib/room.cpp | 5 | ||||
-rw-r--r-- | lib/room.h | 2 |
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) { @@ -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 |