From 8b69437b14021b23c208b27857d139bd2c2bb186 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 7 Nov 2016 19:53:50 +0900 Subject: Fixed a crasher that slipped in the previous commit Room::Private::member() filters out non-members of the room, which is not the right thing when adding messages from a person that left the room, e.g. --- room.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/room.cpp b/room.cpp index 6c33cc58..2d32c430 100644 --- a/room.cpp +++ b/room.cpp @@ -511,7 +511,7 @@ void Room::doAddNewMessageEvents(const Events& events) // automatically promote any further. Others will need explicit read receipts // from the server (or, for the local user, markMessagesAsRead() invocation) // to promote their read markers over the new message events. - User* firstWriter = d->member(events.front()->senderId()); + User* firstWriter = connection()->user(events.front()->senderId()); bool canAutoPromote = d->messageEvents.empty() || lastReadEvent(firstWriter) == d->messageEvents.back()->id(); Event* firstWriterSeriesEnd = canAutoPromote ? events.front() : nullptr; -- cgit v1.2.3