Display a badge for messages decrypted using shared keys (#6023)

The EXA side of element-hq/element-meta#2877: if the keys for a message have been forwarded by another user, indicate that in the UI via the text shown when tapping the event shield.
This commit is contained in:
Richard van der Hoff
2026-01-16 17:24:18 +00:00
committed by GitHub
parent a9c1da5aac
commit ae76e8b0ea
18 changed files with 124 additions and 38 deletions

View File

@@ -34,6 +34,13 @@ data class EventTimelineItem(
val timelineItemDebugInfoProvider: TimelineItemDebugInfoProvider,
val messageShieldProvider: MessageShieldProvider,
val sendHandleProvider: SendHandleProvider,
/**
* If the keys to this message were forwarded by another user via history sharing (MSC4268), the ID of that user.
* If this is set, then [messageShieldProvider] will also return [MessageShield.AuthenticityNotGuaranteed].
*/
val forwarder: UserId?,
/** If [forwarder] is set, the profile of the forwarding user, if it was cached at the time this `EventTimelineItem` was created. */
val forwarderProfile: ProfileDetails?,
) {
fun inReplyTo(): InReplyTo? {
return (content as? MessageContent)?.inReplyTo