mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Stronger model typings
This commit is contained in:
parent
13176a07a9
commit
453e83ea5d
176 changed files with 2118 additions and 1133 deletions
|
@ -3,7 +3,7 @@ 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'
|
||||
import { MActorSignature } from '../../../typings/models'
|
||||
|
||||
async function processViewActivity (options: APProcessorOptions<ActivityCreate | ActivityView>) {
|
||||
const { activity, byActor } = options
|
||||
|
@ -18,11 +18,11 @@ export {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function processCreateView (activity: ActivityView | ActivityCreate, byActor: SignatureActorModel) {
|
||||
async function processCreateView (activity: ActivityView | ActivityCreate, byActor: MActorSignature) {
|
||||
const videoObject = activity.type === 'View' ? activity.object : (activity.object as ViewObject).object
|
||||
|
||||
const options = {
|
||||
videoObject: videoObject,
|
||||
videoObject,
|
||||
fetchType: 'only-video' as 'only-video'
|
||||
}
|
||||
const { video } = await getOrCreateVideoAndAccountAndChannel(options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue