mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Stronger actor association typing in AP functions
This commit is contained in:
parent
511765c9f8
commit
5224c394b3
31 changed files with 146 additions and 89 deletions
|
@ -1,9 +1,9 @@
|
|||
import { ActorModel } from '../../../models/activitypub/actor'
|
||||
import { getOrCreateVideoAndAccountAndChannel } from '../videos'
|
||||
import { forwardVideoRelatedActivity } from '../send/utils'
|
||||
import { Redis } from '../../redis'
|
||||
import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub'
|
||||
import { APProcessorOptions } from '../../../typings/activitypub-processor.model'
|
||||
import { SignatureActorModel } from '../../../typings/models'
|
||||
|
||||
async function processViewActivity (options: APProcessorOptions<ActivityCreate | ActivityView>) {
|
||||
const { activity, byActor } = options
|
||||
|
@ -18,7 +18,7 @@ export {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function processCreateView (activity: ActivityView | ActivityCreate, byActor: ActorModel) {
|
||||
async function processCreateView (activity: ActivityView | ActivityCreate, byActor: SignatureActorModel) {
|
||||
const videoObject = activity.type === 'View' ? activity.object : (activity.object as ViewObject).object
|
||||
|
||||
const options = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue