diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-19 10:34:56 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-19 10:53:16 +0100 |
commit | e12a009254de33bcdbd8334992980fa029c3e10d (patch) | |
tree | 85c6b576d9f76fee33b22e1fdbdca5e9daa24d50 /server/lib/activitypub/send/send-update.ts | |
parent | ce33ee01cd3806201b676c318e9aa930032921b2 (diff) | |
download | PeerTube-e12a009254de33bcdbd8334992980fa029c3e10d.tar.gz PeerTube-e12a009254de33bcdbd8334992980fa029c3e10d.tar.zst PeerTube-e12a009254de33bcdbd8334992980fa029c3e10d.zip |
Status are sent to mastodon
Diffstat (limited to 'server/lib/activitypub/send/send-update.ts')
-rw-r--r-- | server/lib/activitypub/send/send-update.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/server/lib/activitypub/send/send-update.ts b/server/lib/activitypub/send/send-update.ts index 48bbbcac1..b623fec6c 100644 --- a/server/lib/activitypub/send/send-update.ts +++ b/server/lib/activitypub/send/send-update.ts | |||
@@ -5,7 +5,7 @@ import { ActorModel } from '../../../models/activitypub/actor' | |||
5 | import { VideoModel } from '../../../models/video/video' | 5 | import { VideoModel } from '../../../models/video/video' |
6 | import { VideoShareModel } from '../../../models/video/video-share' | 6 | import { VideoShareModel } from '../../../models/video/video-share' |
7 | import { getUpdateActivityPubUrl } from '../url' | 7 | import { getUpdateActivityPubUrl } from '../url' |
8 | import { broadcastToFollowers, getAudience } from './misc' | 8 | import { audiencify, broadcastToFollowers, getAudience } from './misc' |
9 | 9 | ||
10 | async function sendUpdateVideo (video: VideoModel, t: Transaction) { | 10 | async function sendUpdateVideo (video: VideoModel, t: Transaction) { |
11 | const byActor = video.VideoChannel.Account.Actor | 11 | const byActor = video.VideoChannel.Account.Actor |
@@ -41,12 +41,10 @@ async function updateActivityData ( | |||
41 | audience = await getAudience(byActor, t) | 41 | audience = await getAudience(byActor, t) |
42 | } | 42 | } |
43 | 43 | ||
44 | return { | 44 | return audiencify({ |
45 | type: 'Update', | 45 | type: 'Update', |
46 | id: url, | 46 | id: url, |
47 | actor: byActor.url, | 47 | actor: byActor.url, |
48 | to: audience.to, | 48 | object: audiencify(object, audience) |
49 | cc: audience.cc, | 49 | }, audience) |
50 | object | ||
51 | } | ||
52 | } | 50 | } |