From 1246b6d8398d5b93cd0787e166dd3cfa63a781ad Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 10 Nov 2023 14:53:29 +0100 Subject: [PATCH] Also format actor image for api --- client/src/components/ChannelResult.vue | 2 +- server/lib/elastic-search/shared/elastic-search-avatar.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/ChannelResult.vue b/client/src/components/ChannelResult.vue index 2ddebd6..9c439ca 100644 --- a/client/src/components/ChannelResult.vue +++ b/client/src/components/ChannelResult.vue @@ -105,7 +105,7 @@ return this.channel.avatar.url } - if (this.channel.avatar.length === 0) return '' + if (this.channel.avatars.length === 0) return '' const biggestAvatar = [ ...this.channel.avatars ].sort((a1, a2) => { if (a1.width < a2.width) return 1 diff --git a/server/lib/elastic-search/shared/elastic-search-avatar.ts b/server/lib/elastic-search/shared/elastic-search-avatar.ts index 0c6903a..aa7b0e9 100644 --- a/server/lib/elastic-search/shared/elastic-search-avatar.ts +++ b/server/lib/elastic-search/shared/elastic-search-avatar.ts @@ -19,7 +19,7 @@ function formatActorImagesForAPI (images?: ActorImage[], image?: ActorImage) { if (!images) { if (!image) return [] - return [ image ] + return [ formatActorImageForAPI(image) ] } return images.map(a => formatActorImageForAPI(a))