Fix loading actor involved in video

This commit is contained in:
Chocobozzz 2024-06-21 16:05:40 +02:00
parent 985e79f61e
commit 05d84f659d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 6 additions and 1 deletions

View File

@ -59,7 +59,7 @@ export async function getActorsInvolvedInVideo (video: MVideoId, t: Transaction)
? alreadyLoadedActor
: await ActorModel.loadAccountActorFollowerUrlByVideoId(video.id, t)
actors.push(videoActor)
if (videoActor) actors.push(videoActor)
return actors
}

View File

@ -359,6 +359,11 @@ export class ActorModel extends SequelizeModel<ActorModel> {
}
return ActorModel.sequelize.query<MActorId & MActorFollowersUrl>(query, options)
.then(res => {
if (res && res.length !== 0) return res[0]
return undefined
})
}
static listByFollowersUrls (followersUrls: string[], transaction?: Transaction): Promise<MActorFull[]> {