diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-07-24 11:32:02 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-07-24 11:32:02 +0200 |
commit | c51a372076ed92c48a6b1853aded1473c821474b (patch) | |
tree | 8160aa72a88b648a2f1439634164c2465899816d | |
parent | d1c5e514fb65bbea182b34a893bca12b321e3bac (diff) | |
download | libquotient-c51a372076ed92c48a6b1853aded1473c821474b.tar.gz libquotient-c51a372076ed92c48a6b1853aded1473c821474b.zip |
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.
-rw-r--r-- | lib/room.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<PostReceiptJob>(id, QStringLiteral("m.read"), + connection->callApi<PostReceiptJob>(BackgroundRequest, + id, QStringLiteral("m.read"), QUrl::toPercentEncoding( (*upToMarker)->id())); break; |