Skip to content

keep cached avatar&c when refresh fails to get new values

Created by: dakkar

when the remote explicitly tells us a user image is gone, we remove our cached value, but if we fail to get the image, we keep whatever value we already have

this should minimise the problem of avatars randomly disappearing

tested this way:

  • fetched a remote user, avatar was set ok
  • removed avatar id+url from the db, refreshed remote data, avatar was set again correctly
  • set background url in the db to a random value, refreshed remote data, background url was null-ed correctly
  • faked an error in the code that fetches remote images, refreshed remote data, the avatar was not removed from the database

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests
Edited by dakkar

Merge request reports