(avatar, displayName = null, avatarId = null)
| 161 | } |
| 162 | |
| 163 | export async function setAvatar(avatar, displayName = null, avatarId = null) { |
| 164 | if (!avatar) { |
| 165 | return |
| 166 | } |
| 167 | if (!displayName) { |
| 168 | displayName = await getDisplayName(); |
| 169 | } |
| 170 | if (!avatarId) { |
| 171 | avatarId = (await getMetadata(displayName))?.Avatar; |
| 172 | } |
| 173 | if (!displayName || !avatarId) { |
| 174 | return; |
| 175 | } |
| 176 | await writeCacheValue(avatarCacheKey(displayName, avatarId), avatar); |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * Get applicant metadata |
no test coverage detected