diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-06-22 16:38:29 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-06-27 19:44:14 +0900 |
commit | 749def2b983d2338272c0891d15de20df22e2eea (patch) | |
tree | a960df12d66c462d261ee84b55903f6cadc74ed8 /room.h | |
parent | 7d745dca7bdd328fd96acdf53f15f4a5cd7cf484 (diff) | |
download | libquotient-749def2b983d2338272c0891d15de20df22e2eea.tar.gz libquotient-749def2b983d2338272c0891d15de20df22e2eea.zip |
Enable sending RoomMessageEvents
1. PostMessageJob is now SendEventJob, which reflects two things: first, it's a PUT instead of a POST (POST for /send is not supported by the latest spec anyway), so that we could enable tracking transaction ids for local echo in the near future; second, it's no more just about messages, the job can support sending any room events (topic changes etc.).
2. Room::postMessage() now uses the new RoomMessageEvent API to send m.room.message events.
Diffstat (limited to 'room.h')
-rw-r--r-- | room.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -27,6 +27,7 @@ #include <QtCore/QJsonObject> #include "jobs/syncjob.h" +#include "events/roommessageevent.h" #include "joinstate.h" namespace QMatrixClient @@ -142,9 +143,12 @@ namespace QMatrixClient MemberSorter memberSorter() const; public slots: + void postMessage(const QString& plainText, + MessageEventType type = MessageEventType::Text); + void postMessage(RoomMessageEvent* event); + /** @deprecated */ void postMessage(const QString& type, const QString& plainText); - void postMessage(const QString& type, const QString& plainText, - const QString& richText); + void getPreviousContent(int limit = 10); void leaveRoom() const; |