Fix actor outbox
This commit is contained in:
parent
9007daff82
commit
e3d5ea4f82
3 changed files with 19 additions and 10 deletions
|
@ -47,17 +47,14 @@ async function buildActivities (actor: ActorModel, start: number, count: number)
|
|||
const actors = data.data.map(v => v.VideoChannel.Account.Actor)
|
||||
actors.push(actor)
|
||||
|
||||
const followersMatrix = await ActorModel.getActorsFollowerSharedInboxUrls(actors, undefined)
|
||||
|
||||
for (const video of data.data) {
|
||||
const byActor = video.VideoChannel.Account.Actor
|
||||
const createActivityAudience = buildAudience(followersMatrix[byActor.id], video.privacy === VideoPrivacy.PUBLIC)
|
||||
const createActivityAudience = buildAudience([ byActor.followersUrl ], video.privacy === VideoPrivacy.PUBLIC)
|
||||
|
||||
// This is a shared video
|
||||
if (video.VideoShares !== undefined && video.VideoShares.length !== 0) {
|
||||
const videoShare = video.VideoShares[0]
|
||||
const announceAudience = buildAudience(followersMatrix[actor.id], video.privacy === VideoPrivacy.PUBLIC)
|
||||
const announceActivity = await announceActivityData(videoShare.url, actor, video.url, undefined, announceAudience)
|
||||
const announceActivity = await announceActivityData(videoShare.url, actor, video.url, undefined, createActivityAudience)
|
||||
|
||||
activities.push(announceActivity)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue