From 86280098b49709fed6cc850f8ba28dac0b29c216 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 15 Feb 2018 21:58:57 +0200 Subject: Implement server-side notification count --- src/MatrixClient.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/MatrixClient.cc') diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc index b51c14c8..1d42e36c 100644 --- a/src/MatrixClient.cc +++ b/src/MatrixClient.cc @@ -1181,14 +1181,14 @@ MatrixClient::readEvent(const QString &room_id, const QString &event_id) query.addQueryItem("access_token", token_); QUrl endpoint(server_); - endpoint.setPath(clientApiUrl_ + - QString("/rooms/%1/receipt/m.read/%2").arg(room_id).arg(event_id)); + endpoint.setPath(clientApiUrl_ + QString("/rooms/%1/read_markers").arg(room_id)); endpoint.setQuery(query); QNetworkRequest request(QString(endpoint.toEncoded())); request.setHeader(QNetworkRequest::KnownHeaders::ContentTypeHeader, "application/json"); - auto reply = post(request, "{}"); + QJsonObject body({{"m.fully_read", event_id}, {"m.read", event_id}}); + auto reply = post(request, QJsonDocument(body).toJson(QJsonDocument::Compact)); connect(reply, &QNetworkReply::finished, this, [reply]() { reply->deleteLater(); -- cgit 1.5.1