fix for #7729: show system nickname instead of first name in group sidebar preview#7780
Open
apurv3170 wants to merge 1 commit intosignalapp:mainfrom
Open
fix for #7729: show system nickname instead of first name in group sidebar preview#7780apurv3170 wants to merge 1 commit intosignalapp:mainfrom
apurv3170 wants to merge 1 commit intosignalapp:mainfrom
Conversation
When isShort is true(used for sidebar conversation previews), the code was falling back to systemGivenName(i.e. Contact's first name) even when a system contact nickname was set. As a result, even when a system nickname was set, this caused group chat previews to show 'John: Hello' instead of 'Flash: Hello'. Fix by preferring systemNickname over systemGivenName when isShort is true, matching the behavior already used in the full name display and consistent with how nicknames are shown inside the group chat itself. Fixes: signalapp#7729
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributor checklist:
mainbranchpnpm run readyrun passes successfully (more about tests here)Description
It fixes #7729 where the group chat sidebar shows a contact's first name instead of their system nickname, even though the nickname is correctly shown inside the group chat. (e.g. "John: Hello" instead of "Flash: Hello")
Root cause: When
isShort: true(used for sidebar previews), the code fell back tosystemGivenName(first name) even whensystemNicknamewas set.Fix: One line change in
ts/util/getTitle.preload.tswhere it preferssystemNicknameoversystemGivenNamewhenisShort: true, making the sidebar consistent with the group chat view.Note
I was unable to reproduce this locally as it requires macOS system contacts integration.
However, the fix is based on code analysis. It makes the short display consistent with getSystemName() which already prefers systemNickname correctly.
Happy to make changes if the maintainers spot anything wrong.