diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-07-15 13:07:53 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-15 13:07:53 +0900 |
commit | 3dfb74af71fe0cceaeb14d1ef0ade846f3a659f9 (patch) | |
tree | 40482bd167f1e086541ad71cdf634324b40383c6 /connection.cpp | |
parent | 47c2015beb75693c7181fb7359a4aa166e926fe7 (diff) | |
parent | 749def2b983d2338272c0891d15de20df22e2eea (diff) | |
download | libquotient-3dfb74af71fe0cceaeb14d1ef0ade846f3a659f9.tar.gz libquotient-3dfb74af71fe0cceaeb14d1ef0ade846f3a659f9.zip |
Merge pull request #72 from QMatrixClient/kitsune-send-events
Events creation and sending
Diffstat (limited to 'connection.cpp')
-rw-r--r-- | connection.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/connection.cpp b/connection.cpp index 56628a07..f9f1490c 100644 --- a/connection.cpp +++ b/connection.cpp @@ -23,7 +23,7 @@ #include "room.h" #include "jobs/passwordlogin.h" #include "jobs/logoutjob.h" -#include "jobs/postmessagejob.h" +#include "jobs/sendeventjob.h" #include "jobs/postreceiptjob.h" #include "jobs/joinroomjob.h" #include "jobs/leaveroomjob.h" @@ -32,7 +32,6 @@ #include "jobs/mediathumbnailjob.h" #include <QtNetwork/QDnsLookup> -#include <QtCore/QDebug> using namespace QMatrixClient; @@ -188,7 +187,7 @@ void Connection::stopSync() void Connection::postMessage(Room* room, const QString& type, const QString& message) const { - callApi<PostMessageJob>(room->id(), type, message); + callApi<SendEventJob>(room->id(), type, message); } PostReceiptJob* Connection::postReceipt(Room* room, RoomEvent* event) const @@ -316,3 +315,8 @@ Room* Connection::createRoom(const QString& roomId) { return new Room(this, roomId); } + +QByteArray Connection::generateTxnId() +{ + return d->data->generateTxnId(); +} |