mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Status are sent to mastodon
This commit is contained in:
parent
ce33ee01cd
commit
e12a009254
20 changed files with 133 additions and 111 deletions
|
@ -1,5 +1,5 @@
|
|||
import { Transaction } from 'sequelize'
|
||||
import { Activity } from '../../../../shared/models/activitypub'
|
||||
import { Activity, ActivityAudience } from '../../../../shared/models/activitypub'
|
||||
import { logger } from '../../../helpers'
|
||||
import { ACTIVITY_PUB } from '../../../initializers'
|
||||
import { ActorModel } from '../../../models/activitypub/actor'
|
||||
|
@ -116,6 +116,10 @@ async function getAudience (actorSender: ActorModel, t: Transaction, isPublic =
|
|||
return { to, cc }
|
||||
}
|
||||
|
||||
function audiencify (object: any, audience: ActivityAudience) {
|
||||
return Object.assign(object, audience)
|
||||
}
|
||||
|
||||
async function computeFollowerUris (toActorFollower: ActorModel[], followersException: ActorModel[], t: Transaction) {
|
||||
const toActorFollowerIds = toActorFollower.map(a => a.id)
|
||||
|
||||
|
@ -133,5 +137,6 @@ export {
|
|||
getOriginVideoAudience,
|
||||
getActorsInvolvedInVideo,
|
||||
getObjectFollowersAudience,
|
||||
forwardActivity
|
||||
forwardActivity,
|
||||
audiencify
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue