signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.49k stars 2.63k forks source link

Auto-created avatars from lower-case names appear with upper-case initials #6595

Open JohnVeness opened 1 year ago

JohnVeness commented 1 year ago

I have a contact on Signal who has just supplied a lower-case name, e.g. "alice" and hasn't uploaded a profile photo. The Android app generates an avatar with a lower-case "a" in a circle, but the Desktop app generates an avatar with an upper-case "A" in a circle.

Steps to Reproduce

  1. Have a Signal contact with a lower-case name, e.g. "alice" and no profile photo. In my situation, this person is also not in my Android contacts
  2. Receive a message from that person
  3. Observe the conversation in Android and in Desktop

Actual Result: The Android app generates an avatar with a lower-case "a" in a circle. The Desktop app generates an avatar with an upper-case "A" in a circle.

Expected Result: The Android app generates an avatar with a lower-case "a" in a circle. The Desktop app generates an avatar with a lower-case "a" in a circle. Alternatively, the desktop app doesn't auto-generate an avatar at all and just copies a bitmap from the linked device.

Screenshots

Sorry, not right now, but hopefully you get the idea.

Platform Info

Signal Version: 6.29.1 Operating System: Linux Linked Device Version: 6.30.4 on Android 13

sgvictorino commented 12 months ago

It looks like iOS has this behavior as well:

https://github.com/signalapp/Signal-iOS/blob/91a6b934b24ceacd11b5dd5e2ce4261b9aace022/SignalMessaging/utils/Avatars/AvatarBuilder.swift#L523-L524 https://github.com/signalapp/Signal-iOS/blob/91a6b934b24ceacd11b5dd5e2ce4261b9aace022/SignalServiceKit/src/Util/OWSFormat.swift#L38-L39

import Foundation

print(PersonNameComponentsFormatter.localizedString(from: PersonNameComponents(givenName: "alice"), style: .abbreviated)) // "A"