summary refs log tree commit diff
path: root/src/MatrixClient.cc
diff options
context:
space:
mode:
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();