mautrix / signal

A Matrix-Signal puppeting bridge
GNU Affero General Public License v3.0
484 stars 74 forks source link

Update profile avatar paths & hashes properly #472

Open AndrewFerr opened 4 months ago

AndrewFerr commented 4 months ago

This is a leftover commit from https://github.com/mautrix/signal/pull/449 that may still be relevant.

When running the bridge without this change, avatar updates weren't getting saved to the store when I expected them to & new avatars wouldn't appear in Matrix until a bridge restart.

AndrewFerr commented 3 months ago

As explained here, the problem this PR was thought to fix is no longer present. So that makes this PR just an optional performance change.

Other than avoiding an unneeded hash calculation, it also ensures that changes to a puppet's avatar path are saved to the DB when the puppet's profile metadata comes from a Signal profile (not a contact) and the profile avatar path changed but the hash did not.