Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent recipient names when composing a message #6972

Merged
merged 2 commits into from Jun 16, 2023

Conversation

gitstart
Copy link
Contributor

@gitstart gitstart commented Jun 9, 2023

fixes #6816

PR Description

This PR ensures that the recipient's name is consistent when composing a message regardless of whether they are found using a nickname or not

Steps to reproduce

  1. Have a contact with the nickname different from the name.
  2. Create a new message in K9
  3. Start typing in "To"

Issue loom

https://www.loom.com/share/429b833c1d8c46c4aeeaaae1902f0459

Fix loom

https://www.loom.com/share/554b780adeb14b0aa0e4b3579b17ec55


This code was written and reviewed by GitStart Community. Growing great engineers, one PR at a time.

@gitstart gitstart closed this Jun 9, 2023
@gitstart gitstart reopened this Jun 9, 2023
@gitstart gitstart marked this pull request as ready for review June 9, 2023 19:44
Copy link
Member

@cketti cketti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has the desired effect, but it obscures the intended behavior when reading the code.

Currently, the intended behavior is to use the nickname in the outgoing message when the recipient was added using the nickname. fillContactDataFromCursor() has a parameter prefilledName to accomplish that.
When changing the behavior, that mechanism should be removed entirely, i.e. the prefilledName parameter should be removed. Then PROJECTION_NICKNAME can be reduced to just fetch the contact ID.

@gitstart
Copy link
Contributor Author

This change has the desired effect, but it obscures the intended behavior when reading the code.

Currently, the intended behavior is to use the nickname in the outgoing message when the recipient was added using the nickname. fillContactDataFromCursor() has a parameter prefilledName to accomplish that. When changing the behavior, that mechanism should be removed entirely, i.e. the prefilledName parameter should be removed. Then PROJECTION_NICKNAME can be reduced to just fetch the contact ID.

Thank you for reviewing PR @cketti,
We have attended to the comment. Please take a look.

@cketti cketti merged commit fb457bc into thunderbird:main Jun 16, 2023
2 checks passed
@cketti
Copy link
Member

cketti commented Jun 16, 2023

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent recipient names when composing a message
2 participants