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

Use latest profile info #449

Closed

Conversation

AndrewFerr
Copy link
Contributor

This is an alternative approach to #445 for helping with #396: if a Signal profile cannot be fetched by a particular bridged user's Signal account, use the profile info from the most recent successful fetch done by some other bridge user.

Profiles retrieved this way are used only as a fallback for setting a Signal puppet's displayname/avatar, not for updating the contact store.

@tulir
Copy link
Member

tulir commented Feb 16, 2024

Querying the database for profiles fetched by other users seems weird 🤔

The mechanism used in other bridges and the old signal bridge is the name quality field: if fetching doesn't return profile info (or it fails) and the puppet already has a profile name, then just don't try to update the name at all.

@AndrewFerr
Copy link
Contributor Author

I used profile recency as a simpler alternative to a proper quality metric, which I wasn't sure how to implement properly in light of it being more complicated in this version of the bridge.

The idea here is that someone else having a more recent fetch for a given user's profile should be analogous to higher-quality profile data for that user.

This is admittedly an incomplete solution to the name quality problem, so feel free to close this if you'd rather go straight to a full solution.

@tulir
Copy link
Member

tulir commented Feb 16, 2024

It might not necessarily need to be more complicated since the profile info is refetched each time, at least assuming a successful fetch means it's up to date. I'll see if I can come up with a simple solution

- Store updates to profile avatar hashes in signalmeow_contacts
- Have puppets use the stored contact avatar hash rather than
  recomputing it
- Have puppets update their avatar path when the profile avatar path
  changed but the hash did not
- Have puppets clear their avatar path when using a contact avatar
  instead of a profile avatar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants