From e3d5ea4f82ffbb51eae3471f004bf382b07ea04c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 28 May 2018 12:13:00 +0200 Subject: Fix actor outbox --- server/models/video/video.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'server/models/video/video.ts') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index f4689fe12..1640cd57f 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -602,6 +602,19 @@ export class VideoModel extends Model { attributes: [ 'id', 'url' ], model: VideoShareModel.unscoped(), required: false, + // We only want videos shared by this actor + where: { + [Sequelize.Op.and]: [ + { + id: { + [Sequelize.Op.not]: null + } + }, + { + actorId + } + ] + }, include: [ { attributes: [ 'id', 'url' ], @@ -619,14 +632,14 @@ export class VideoModel extends Model { required: true, include: [ { - attributes: [ 'id', 'url' ], + attributes: [ 'id', 'url', 'followersUrl' ], model: ActorModel.unscoped(), required: true } ] }, { - attributes: [ 'id', 'url' ], + attributes: [ 'id', 'url', 'followersUrl' ], model: ActorModel.unscoped(), required: true } -- cgit v1.2.3