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

Don't "downgrade" displaynames #396

Closed
maltee1 opened this issue Dec 26, 2023 · 5 comments · Fixed by #464
Closed

Don't "downgrade" displaynames #396

maltee1 opened this issue Dec 26, 2023 · 5 comments · Fixed by #464
Labels
bug Something isn't working

Comments

@maltee1
Copy link
Contributor

maltee1 commented Dec 26, 2023

The go bridge seems to be suffering from the same problem the python bridge suffered from: renaming of users on every sync. For now I can only see users being renamed back and forth between phone number and profile name, so a good first measure might be to not downgrade a name, i.e. not rename to a phone number if the current one is a profile name.
I can't yet tell whether some profile name information will eventually lose sync between different bridge users, I guess I'll wait and file another bug report in that case.

@maltee1 maltee1 added the bug Something isn't working label Dec 26, 2023
@maltee1
Copy link
Contributor Author

maltee1 commented Dec 26, 2023

I think this was solved with "name quality" in the python bridge, but I think a more straightforward way would be to just store the profile name and check if it's empty - in that case, just use the previously known profile name.

@tulir
Copy link
Member

tulir commented Dec 27, 2023

Name quality is probably required, possibly even more complicated than the python bridge. It should include the profile fetch timestamp or some other version identifier for the profile name.

@maltee1
Copy link
Contributor Author

maltee1 commented Feb 1, 2024

This appears to affect avatars, too. While re-setting the same avatar seems fixed, I'm still seeing avatars being removed and re-set.

Is it possible that contact info is sometimes empty and not updating empty contact info would already solve the problem? Maybe checking for empty profileKey or something would work?

@AndrewFerr
Copy link
Contributor

Is it possible that contact info is sometimes empty and not updating empty contact info would already solve the problem? Maybe checking for empty profileKey or something would work?

What can happen is that the contact info isn't entirely empty, but fields that had been filled on an earlier fetch are empty on a later fetch. For example, a fetched info can have all but its phone number be empty, even if an earlier fetch included a profile name.

@maltee1
Copy link
Contributor Author

maltee1 commented Feb 12, 2024

I figured out the issue for profile names in my particular case I think. It seems the bridge attempts to sync profiles regardless of whether a profile key is available or not (profile_key == \x in the database). If a bridge user has someone in their contact list but hasn't spoken to them, their profile will return empty. If someone else has their profile key and can therefore get their profile name, the bridge will toggle between name and phone number.

It probably doesn't make sense to attempt fetching profiles if no profile key is available. Disabling that should significantly improve the situation.

Edit: Nevermind, you did that already

tulir added a commit that referenced this issue Feb 24, 2024
tulir added a commit that referenced this issue Feb 28, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

3 participants