aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-19 18:21:02 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-19 18:21:02 +0200
commit2f0ea91020d47cf1c3ac2bf6b0c53aa9afc6ddeb (patch)
tree6a410d72c02c23dd6856db458c82cde3bb978a84 /lib/room.cpp
parente12d7ba24f2fb833255f8fecd80cafa9f06dbadf (diff)
downloadlibquotient-2f0ea91020d47cf1c3ac2bf6b0c53aa9afc6ddeb.tar.gz
libquotient-2f0ea91020d47cf1c3ac2bf6b0c53aa9afc6ddeb.zip
Fix m.read getting stuck behind m.fully_read
Diffstat (limited to 'lib/room.cpp')
-rw-r--r--lib/room.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index ec0ab379..c9a1856f 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -793,7 +793,11 @@ void Room::Private::markMessagesAsRead(const rev_iter_t &upToMarker)
{
if (upToMarker < q->readMarker()) {
setFullyReadMarker((*upToMarker)->id());
+ // Assuming that if a read receipt was sent on a newer event, it will
+ // stay there instead of "un-reading" notifications/mentions from
+ // m.fully_read to m.read
connection->callApi<SetReadMarkerJob>(BackgroundRequest, id,
+ fullyReadUntilEventId,
fullyReadUntilEventId);
}
}