mautrix / signal

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

Reduce profile expiry time #478

Closed AndrewFerr closed 3 months ago

AndrewFerr commented 3 months ago

For #476

tulir commented 3 months ago

Probably better to just wait an hour for avatars to update 🤔

AndrewFerr commented 3 months ago

A compromise could be to add a bridge config option to set the profile expiry time.

The situation I wanted to avoid is someone changing their Signal avatar a few times & a Matrix user being unaware of it until later.

tulir commented 3 months ago

Yeah making it configurable is probably fine

AndrewFerr commented 3 months ago

Actually, a better way is to fetch the profile when receiving a SyncMessage with a FetchLatest indicating a profile change. Then the existing fetch can remain as-is, but used as a safety check in case an on-demand was missed.

AndrewFerr commented 3 months ago

Pushed the config change for posterity, but abandoning this in favour of #482

AndrewFerr commented 3 months ago

It's been pointed out that the SyncMessage for profile changes is only for logged-in users, so it's not a full solution as I had thought.

Still, I'll leave this PR closed because reducing the profile expiry time incurs the risk of doing a lot of extra fetches, as it would trigger a fetch on any new Signal message (plus some other Signal events) that happen after the expiry time, even if the profile hasn't changed.