Aggregate similar state events

This commit is contained in:
Tobias Fella
2022-02-25 20:10:07 +00:00
parent 37c7fe380b
commit db8b2fd64b
9 changed files with 181 additions and 32 deletions

View File

@@ -396,6 +396,18 @@ QString NeoChatRoom::eventToString(const RoomEvent &evt, Qt::TextFormat format,
[this](const RoomMemberEvent &e) {
// FIXME: Rewind to the name that was at the time of this event
auto subjectName = this->htmlSafeMemberName(e.userId());
if (e.membership() == MembershipType::Leave) {
auto displayName = e.prevContent()->displayName;
#ifdef QUOTIENT_07
if (displayName) {
subjectName = sanitized(*displayName).toHtmlEscaped();
#else
if (displayName.isEmpty()) {
subjectName = sanitized(displayName).toHtmlEscaped();
#endif
}
}
// The below code assumes senderName output in AuthorRole
switch (e.membership()) {
case MembershipType::Invite: