Skip to content

Commit 64ba23d

Browse files
committed
fix(NcAvatar): redirect to guest avatar if avatar doesnt exist
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 3619404 commit 64ba23d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/getAvatarUrl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface AvatarUrlOptions {
3333
*/
3434
export function getAvatarUrl(user: string, options?: AvatarUrlOptions): string {
3535
// backend only supports 64 and 512px
36-
// so we only requrest the needed size for better caching of the request.
36+
// so we only request the needed size for better caching of the request.
3737
const size = (options?.size || 64) <= 64
3838
? 64
3939
: 512
@@ -45,7 +45,7 @@ export function getAvatarUrl(user: string, options?: AvatarUrlOptions): string {
4545
? '/dark'
4646
: ''
4747

48-
return generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}`, {
48+
return generateUrl(`/avatar${guestUrl}/{user}/{size}${themeUrl}?guestFallback=true`, {
4949
user,
5050
size,
5151
})

0 commit comments

Comments
 (0)