From c51a372076ed92c48a6b1853aded1473c821474b Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 24 Jul 2020 11:32:02 +0200 Subject: Room: send read receipts in a background request Sending them in the foreground causes Quaternion to throw scary messages when read receipts don't go through while that's actually not a big deal. Also, network traffic deprioritisation. --- lib/room.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/room.cpp') diff --git a/lib/room.cpp b/lib/room.cpp index 3dd366f8..6f6128e0 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -735,7 +735,8 @@ Room::Changes Room::Private::markMessagesAsRead(rev_iter_t upToMarker) // until the previous last-read message, whichever comes first. for (; upToMarker < prevMarker; ++upToMarker) { if ((*upToMarker)->senderId() != q->localUser()->id()) { - connection->callApi(id, QStringLiteral("m.read"), + connection->callApi(BackgroundRequest, + id, QStringLiteral("m.read"), QUrl::toPercentEncoding( (*upToMarker)->id())); break; -- cgit v1.2.3