summary refs log tree commit diff
path: root/src/MatrixClient.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-15 21:58:57 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-15 21:58:57 +0200
commit86280098b49709fed6cc850f8ba28dac0b29c216 (patch)
treec308583ee8dee63f21984ff4ab4d165e350c8128 /src/MatrixClient.cc
parentSimplify variant access with std::visit (diff)
downloadnheko-86280098b49709fed6cc850f8ba28dac0b29c216.tar.xz
Implement server-side notification count
Diffstat (limited to 'src/MatrixClient.cc')
-rw-r--r--src/MatrixClient.cc6
1 files changed, 3 insertions, 3 deletions
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();