Display room's latest event instead of topic when possible.
This commit is contained in:
@@ -97,3 +97,10 @@ void MatriqueRoom::sendTypingNotification(bool isTyping) {
|
||||
connection()->callApi<SetTypingJob>(BackgroundRequest, localUser()->id(),
|
||||
id(), isTyping, 10000);
|
||||
}
|
||||
|
||||
QString MatriqueRoom::lastEvent() {
|
||||
if (timelineSize() == 0) return "";
|
||||
const RoomEvent* lastEvent = messageEvents().rbegin()->get();
|
||||
return user(lastEvent->senderId())->displayname() + ": " +
|
||||
lastEvent->contentJson().value("body").toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user