diff options
Diffstat (limited to 'server/lib/activitypub/send')
-rw-r--r-- | server/lib/activitypub/send/http.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/send/send-create.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/send/send-update.ts | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/activitypub/send/http.ts b/server/lib/activitypub/send/http.ts index d8d0b8542..ad7869853 100644 --- a/server/lib/activitypub/send/http.ts +++ b/server/lib/activitypub/send/http.ts | |||
@@ -52,9 +52,9 @@ function buildGlobalHeaders (body: any) { | |||
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | function signAndContextify <T> (byActor: MActor, data: T, contextType: ContextType | null) { | 55 | async function signAndContextify <T> (byActor: MActor, data: T, contextType: ContextType | null) { |
56 | const activity = contextType | 56 | const activity = contextType |
57 | ? activityPubContextify(data, contextType) | 57 | ? await activityPubContextify(data, contextType) |
58 | : data | 58 | : data |
59 | 59 | ||
60 | return signJsonLDObject(byActor, activity) | 60 | return signJsonLDObject(byActor, activity) |
diff --git a/server/lib/activitypub/send/send-create.ts b/server/lib/activitypub/send/send-create.ts index 7c3a6bdd0..0e996ab80 100644 --- a/server/lib/activitypub/send/send-create.ts +++ b/server/lib/activitypub/send/send-create.ts | |||
@@ -33,7 +33,7 @@ async function sendCreateVideo (video: MVideoAP, transaction: Transaction) { | |||
33 | logger.info('Creating job to send video creation of %s.', video.url, lTags(video.uuid)) | 33 | logger.info('Creating job to send video creation of %s.', video.url, lTags(video.uuid)) |
34 | 34 | ||
35 | const byActor = video.VideoChannel.Account.Actor | 35 | const byActor = video.VideoChannel.Account.Actor |
36 | const videoObject = video.toActivityPubObject() | 36 | const videoObject = await video.toActivityPubObject() |
37 | 37 | ||
38 | const audience = getAudience(byActor, video.privacy === VideoPrivacy.PUBLIC) | 38 | const audience = getAudience(byActor, video.privacy === VideoPrivacy.PUBLIC) |
39 | const createActivity = buildCreateActivity(video.url, byActor, videoObject, audience) | 39 | const createActivity = buildCreateActivity(video.url, byActor, videoObject, audience) |
diff --git a/server/lib/activitypub/send/send-update.ts b/server/lib/activitypub/send/send-update.ts index 24983dd19..5a66294e6 100644 --- a/server/lib/activitypub/send/send-update.ts +++ b/server/lib/activitypub/send/send-update.ts | |||
@@ -36,7 +36,7 @@ async function sendUpdateVideo (videoArg: MVideoAPWithoutCaption, transaction: T | |||
36 | video.VideoCaptions = await video.$get('VideoCaptions', { transaction }) | 36 | video.VideoCaptions = await video.$get('VideoCaptions', { transaction }) |
37 | } | 37 | } |
38 | 38 | ||
39 | const videoObject = video.toActivityPubObject() | 39 | const videoObject = await video.toActivityPubObject() |
40 | const audience = getAudience(byActor, video.privacy === VideoPrivacy.PUBLIC) | 40 | const audience = getAudience(byActor, video.privacy === VideoPrivacy.PUBLIC) |
41 | 41 | ||
42 | const updateActivity = buildUpdateActivity(url, byActor, videoObject, audience) | 42 | const updateActivity = buildUpdateActivity(url, byActor, videoObject, audience) |