Filter out invalid images from peertube
This commit is contained in:
parent
3299c9e124
commit
5800f354cc
|
@ -35,7 +35,8 @@ function getImagesInfoFromObject (actorObject: ActivityPubActor, type: ActorImag
|
|||
? actorObject.icons || actorObject.icon
|
||||
: actorObject.image
|
||||
|
||||
return normalizeIconOrImage(iconsOrImages).map(iconOrImage => {
|
||||
return normalizeIconOrImage(iconsOrImages)
|
||||
.map(iconOrImage => {
|
||||
const mimetypes = MIMETYPES.IMAGE
|
||||
|
||||
if (iconOrImage.type !== 'Image' || !isActivityPubUrlValid(iconOrImage.url)) return undefined
|
||||
|
@ -60,6 +61,7 @@ function getImagesInfoFromObject (actorObject: ActivityPubActor, type: ActorImag
|
|||
type
|
||||
}
|
||||
})
|
||||
.filter(i => !!i)
|
||||
}
|
||||
|
||||
function getActorDisplayNameFromObject (actorObject: ActivityPubActor) {
|
||||
|
|
Loading…
Reference in New Issue