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/misc.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/misc.ts')
-rw-r--r-- | server/lib/activitypub/send/misc.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/server/lib/activitypub/send/misc.ts b/server/lib/activitypub/send/misc.ts index 14101e630..2dc8d3d59 100644 --- a/server/lib/activitypub/send/misc.ts +++ b/server/lib/activitypub/send/misc.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Transaction } from 'sequelize' | 1 | import { Transaction } from 'sequelize' |
2 | import { Activity } from '../../../../shared/models/activitypub' | 2 | import { Activity, ActivityAudience } from '../../../../shared/models/activitypub' |
3 | import { logger } from '../../../helpers' | 3 | import { logger } from '../../../helpers' |
4 | import { ACTIVITY_PUB } from '../../../initializers' | 4 | import { ACTIVITY_PUB } from '../../../initializers' |
5 | import { ActorModel } from '../../../models/activitypub/actor' | 5 | import { ActorModel } from '../../../models/activitypub/actor' |
@@ -116,6 +116,10 @@ async function getAudience (actorSender: ActorModel, t: Transaction, isPublic = | |||
116 | return { to, cc } | 116 | return { to, cc } |
117 | } | 117 | } |
118 | 118 | ||
119 | function audiencify (object: any, audience: ActivityAudience) { | ||
120 | return Object.assign(object, audience) | ||
121 | } | ||
122 | |||
119 | async function computeFollowerUris (toActorFollower: ActorModel[], followersException: ActorModel[], t: Transaction) { | 123 | async function computeFollowerUris (toActorFollower: ActorModel[], followersException: ActorModel[], t: Transaction) { |
120 | const toActorFollowerIds = toActorFollower.map(a => a.id) | 124 | const toActorFollowerIds = toActorFollower.map(a => a.id) |
121 | 125 | ||
@@ -133,5 +137,6 @@ export { | |||
133 | getOriginVideoAudience, | 137 | getOriginVideoAudience, |
134 | getActorsInvolvedInVideo, | 138 | getActorsInvolvedInVideo, |
135 | getObjectFollowersAudience, | 139 | getObjectFollowersAudience, |
136 | forwardActivity | 140 | forwardActivity, |
141 | audiencify | ||
137 | } | 142 | } |