maptio icon indicating copy to clipboard operation
maptio copied to clipboard

Update avatar when user changes their name

Open rgoj opened this issue 3 years ago • 1 comments

Currently, when a name is updated in the member form, the avatar stays the same, we should instead update it (unless the user has uploaded an image that is!).

This has already caused an issue once in production.

rgoj avatar Apr 06 '22 19:04 rgoj

An interesting case was mentioned here, something to also look at when we get to working on avatars: https://app.intercom.com/a/inbox/q3x5lnhp/inbox/shared/all/conversation/106323200013049#part_id=comment-106323200013049-21895730566

In that case, the user's picture was set to an image stored by Auth0: https://s.gravatar.com/avatar/20f1a186880646214ecebdb533ed7059?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2F <<initials here>> .png rather than the more usual URLs. I need to look into this a bit more!

Also, we're going to need some flag on the user object like pictureUpdatedByUser: bool, otherwise the current code just checks for whether a picture exists and doesn't care whether it's an automatically generated one or not - meaning that's bound to be at least one source of the avatars not getting updated! A flag, or checking for the auto-generated URL in the picture URL... but a flag would be cleaner, I think.

rgoj avatar Sep 08 '23 08:09 rgoj