1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix actor outbox

This commit is contained in:
Chocobozzz 2018-05-28 12:13:00 +02:00
parent 9007daff82
commit e3d5ea4f82
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 19 additions and 10 deletions

View file

@ -602,6 +602,19 @@ export class VideoModel extends Model<VideoModel> {
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<VideoModel> {
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
}