aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/room.cpp b/room.cpp
index cb9098d8..9300056a 100644
--- a/room.cpp
+++ b/room.cpp
@@ -603,13 +603,10 @@ void Room::processEphemeralEvent(Event* event)
if( event->type() == EventType::Receipt )
{
auto receiptEvent = static_cast<ReceiptEvent*>(event);
- for( QString eventId: receiptEvent->events() )
- {
- const auto receipts = receiptEvent->receiptsForEvent(eventId);
- for( const Receipt& r: receipts )
+ for( const auto &eventReceiptPair: receiptEvent->events() )
+ for( const Receipt& r: eventReceiptPair.second )
if (auto m = d->member(r.userId))
- d->promoteReadMarker(m, eventId);
- }
+ d->promoteReadMarker(m, eventReceiptPair.first);
}
}