aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video.ts17
1 files changed, 15 insertions, 2 deletions
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<VideoModel> {
602 attributes: [ 'id', 'url' ], 602 attributes: [ 'id', 'url' ],
603 model: VideoShareModel.unscoped(), 603 model: VideoShareModel.unscoped(),
604 required: false, 604 required: false,
605 // We only want videos shared by this actor
606 where: {
607 [Sequelize.Op.and]: [
608 {
609 id: {
610 [Sequelize.Op.not]: null
611 }
612 },
613 {
614 actorId
615 }
616 ]
617 },
605 include: [ 618 include: [
606 { 619 {
607 attributes: [ 'id', 'url' ], 620 attributes: [ 'id', 'url' ],
@@ -619,14 +632,14 @@ export class VideoModel extends Model<VideoModel> {
619 required: true, 632 required: true,
620 include: [ 633 include: [
621 { 634 {
622 attributes: [ 'id', 'url' ], 635 attributes: [ 'id', 'url', 'followersUrl' ],
623 model: ActorModel.unscoped(), 636 model: ActorModel.unscoped(),
624 required: true 637 required: true
625 } 638 }
626 ] 639 ]
627 }, 640 },
628 { 641 {
629 attributes: [ 'id', 'url' ], 642 attributes: [ 'id', 'url', 'followersUrl' ],
630 model: ActorModel.unscoped(), 643 model: ActorModel.unscoped(),
631 required: true 644 required: true
632 } 645 }