aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/room.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 36735e40..1f239322 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -991,10 +991,12 @@ void Room::setLastDisplayedEventId(const QString& eventId)
d->lastDisplayedEventId = eventId;
emit lastDisplayedEventChanged();
- if (d->displayed && marker < readMarker(localUser()))
+ if (d->displayed && marker < readMarker(localUser())) {
+ d->setLastReadReceipt(localUser(), marker);
connection()->callApi<PostReceiptJob>(BackgroundRequest, id(),
QStringLiteral("m.read"),
QUrl::toPercentEncoding(eventId));
+ }
}
void Room::setLastDisplayedEvent(TimelineItem::index_t index)