diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | connection.cpp | 4 | ||||
-rw-r--r-- | room.cpp | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 29a5c811..1cf871a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,10 +71,8 @@ set(libqmatrixclient_SRCS events/receiptevent.cpp jobs/basejob.cpp jobs/checkauthmethods.cpp - jobs/passwordlogin.cpp jobs/sendeventjob.cpp jobs/setroomstatejob.cpp - jobs/postreceiptjob.cpp jobs/joinroomjob.cpp jobs/roommessagesjob.cpp jobs/syncjob.cpp diff --git a/connection.cpp b/connection.cpp index d4f6bf61..4fb661f3 100644 --- a/connection.cpp +++ b/connection.cpp @@ -23,8 +23,8 @@ #include "room.h" #include "jobs/generated/login.h" #include "jobs/generated/logout.h" +#include "jobs/generated/receipts.h" #include "jobs/sendeventjob.h" -#include "jobs/postreceiptjob.h" #include "jobs/joinroomjob.h" #include "jobs/roommessagesjob.h" #include "jobs/syncjob.h" @@ -281,7 +281,7 @@ void Connection::postMessage(Room* room, const QString& type, const QString& mes PostReceiptJob* Connection::postReceipt(Room* room, RoomEvent* event) const { - return callApi<PostReceiptJob>(room->id(), event->id()); + return callApi<PostReceiptJob>(room->id(), "m.read", event->id()); } JoinRoomJob* Connection::joinRoom(const QString& roomAlias) @@ -22,6 +22,7 @@ #include "jobs/generated/inviting.h" #include "jobs/generated/banning.h" #include "jobs/generated/leaving.h" +#include "jobs/generated/receipts.h" #include "jobs/setroomstatejob.h" #include "events/simplestateevents.h" #include "events/roomavatarevent.h" @@ -30,7 +31,6 @@ #include "events/receiptevent.h" #include "jobs/sendeventjob.h" #include "jobs/roommessagesjob.h" -#include "jobs/postreceiptjob.h" #include "avatar.h" #include "connection.h" #include "user.h" @@ -283,7 +283,8 @@ void Room::markMessagesAsRead(Room::rev_iter_t upToMarker) { if ((*markers.second)->senderId() != localUser()->id()) { - connection()->callApi<PostReceiptJob>(id(), (*markers.second)->id()); + connection()->callApi<PostReceiptJob>( + id(), "m.read", (*markers.second)->id()); break; } } |