Highlight other party in state events

BUG: 458267
This commit is contained in:
Tobias Fella
2022-11-10 20:11:00 +01:00
parent 35f4a4d1b4
commit 962a1b228c
2 changed files with 3 additions and 1 deletions

View File

@@ -489,6 +489,8 @@ QString NeoChatRoom::eventToString(const RoomEvent &evt, Qt::TextFormat format,
#endif
}
}
subjectName = QStringLiteral("<a href=\"https://matrix.to/#/%1\" style=\"color: %2\">%3</a>")
.arg(e.userId(), static_cast<NeoChatUser *>(user(e.userId()))->color().name(), subjectName);
// The below code assumes senderName output in AuthorRole
switch (e.membership()) {

View File

@@ -99,7 +99,7 @@ Control {
wrapMode: Text.WordWrap
textFormat: Text.RichText
text: `<style>a {text-decoration: none;}</style><a href="https://matrix.to/#/${author.id}" style="color: ${author.color}">${currentRoom.htmlSafeMemberName(author.id)}</a> ${aggregateDisplay}`
onLinkActivated: userDetailDialog.createObject(ApplicationWindow.overlay, {room: currentRoom, user: author.object, displayName: author.displayName, avatarMediaId: author.avatarMediaId, avatarUrl: author.avatarUrl}).open()
onLinkActivated: RoomManager.openResource(link)
}
}
}