aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--room.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/room.cpp b/room.cpp
index cb94ddb6..4f818473 100644
--- a/room.cpp
+++ b/room.cpp
@@ -402,8 +402,9 @@ void Room::Private::markMessagesAsRead(Room::rev_iter_t upToMarker)
{
if ((*markers.second)->senderId() != q->localUser()->id())
{
- connection->callApi<PostReceiptJob>(
- id, "m.read", (*markers.second)->id());
+ auto eventId = (*markers.second)->id();
+ connection->callApi<PostReceiptJob>(id, "m.read", eventId);
+ setAccountData(ReadMarkerEvent(eventId));
break;
}
}