libQuotient
libQuotient copied to clipboard
Fix showing edited message for historical messages
Fixes #713
This is mostly just extracting the code from Room::Private::addNewMessageEvents
in order to be able to reuse it in Room::Private::addHistoricalMessageEvents
. Note that there is one change: the range of events being searched for the replaced event is changed from (events.begin(), it)
to (events.begin(), events.end())
- Apparently this is required when handling historical messages; I don't know the exact reason, but don't see how it could cause problems.