diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-11-07 19:53:50 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-11-07 19:53:50 +0900 |
commit | 8b69437b14021b23c208b27857d139bd2c2bb186 (patch) | |
tree | 43c16a1b7c2b5582dfb8ef958d0369bf481468df | |
parent | cb108696e62ffd54410297423b3aea0549ddcc84 (diff) | |
download | libquotient-8b69437b14021b23c208b27857d139bd2c2bb186.tar.gz libquotient-8b69437b14021b23c208b27857d139bd2c2bb186.zip |
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.
-rw-r--r-- | room.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |