diff --git a/lib/shared/avatar-utils.js b/lib/shared/avatar-utils.js --- a/lib/shared/avatar-utils.js +++ b/lib/shared/avatar-utils.js @@ -52,6 +52,11 @@ { color: selectedThreadColors[8], emoji: '🏀', type: 'emoji' }, ]; +function getRandomDefaultEmojiAvatar(): ClientEmojiAvatar { + const randomIndex = Math.floor(Math.random() * defaultEmojiAvatars.length); + return defaultEmojiAvatars[randomIndex]; +} + function getDefaultAvatar(hashKey: string, color?: string): ClientEmojiAvatar { const avatarIndex = stringHash(hashKey) % defaultEmojiAvatars.length; @@ -157,6 +162,7 @@ } export { + getRandomDefaultEmojiAvatar, getAvatarForUser, getUserAvatarForThread, useAvatarForThread,