Also format actor image for api

This commit is contained in:
Chocobozzz 2023-11-10 14:53:29 +01:00
parent 3f6eb26a8d
commit 1246b6d839
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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))