mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Fix a bug where your own emotes showed as '* You emoted'. (#4038)
This commit is contained in:
@@ -24,7 +24,7 @@ struct RoomMessageEventStringBuilder {
|
||||
let attributedStringBuilder: AttributedStringBuilderProtocol
|
||||
let destination: Destination
|
||||
|
||||
func buildAttributedString(for messageType: MessageType, senderDisplayName: String) -> AttributedString {
|
||||
func buildAttributedString(for messageType: MessageType, senderDisplayName: String, isOutgoing: Bool) -> AttributedString {
|
||||
let message: AttributedString
|
||||
switch messageType {
|
||||
case .emote(content: let content):
|
||||
@@ -69,7 +69,7 @@ struct RoomMessageEventStringBuilder {
|
||||
}
|
||||
|
||||
if destination == .roomList {
|
||||
return prefix(message, with: senderDisplayName)
|
||||
return prefix(message, with: isOutgoing ? L10n.commonYou : senderDisplayName)
|
||||
} else {
|
||||
return message
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user