Ignore colon in lastEvent() if it is state event. Fix #137.

This commit is contained in:
Black Hat 2019-05-06 11:19:46 +08:00
parent 4610d61b92
commit a79893900d
1 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,8 @@ QString SpectralRoom::lastEvent() {
if (timelineSize() == 0)
return "";
const RoomEvent* lastEvent = messageEvents().rbegin()->get();
return user(lastEvent->senderId())->displayname() + ": " +
return user(lastEvent->senderId())->displayname() +
(lastEvent->isStateEvent() ? " " : ": ") +
utils::removeReply(eventToString(*lastEvent));
}