[lib] introduce getAvatarForUser in avatar-utils
Summary:
Introduce getAvatarForUser in avatar-utils. getAvatarForUser is a function that checks if a user has an avatar, and either returns that or randomly generates an emoji avatar for the user and returns that. We generate an emoji avatar based on the user's username. If the user does not have a username set, we just default to an avatar with this emoji 👤 for the user.
This diff won't be landed until there is a feature flag for the avatars work
Linear Task: https://linear.app/comm/issue/ENG-3257/create-function-to-automatically-select-an-emoji-avatar-for-users-with
Test Plan:
I rendered the avatar (coming later in the stack) and checked to make sure the default emoji avatars didn't change for the same user
Ginsu's friends list
Dan's avatar
Ryan's avatar
Unknown user:
Reviewers: ashoat, atul
Reviewed By: ashoat
Subscribers: varun, ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D7053