1 import { VideoModel } from '../models/video/video'
2 import { VideoCommentModel } from '../models/video/video-comment'
3 import { VideoCommentCreate } from '../../shared/models/videos/video-comment.model'
4 import { VideoCreate } from '../../shared/models/videos'
5 import { UserModel } from '../models/account/user'
6 import { VideoTorrentObject } from '../../shared/models/activitypub/objects'
7 import { ActivityCreate } from '../../shared/models/activitypub'
8 import { ActorModel } from '../models/activitypub/actor'
9 import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object'
11 export type AcceptResult = {
16 // Can be filtered by plugins
17 function isLocalVideoAccepted (object: {
18 videoBody: VideoCreate,
19 videoFile: Express.Multer.File & { duration?: number },
22 return { accepted: true }
25 function isLocalVideoThreadAccepted (_object: {
26 commentBody: VideoCommentCreate,
30 return { accepted: true }
33 function isLocalVideoCommentReplyAccepted (_object: {
34 commentBody: VideoCommentCreate,
35 parentComment: VideoCommentModel,
39 return { accepted: true }
42 function isRemoteVideoAccepted (_object: {
43 activity: ActivityCreate,
44 videoAP: VideoTorrentObject,
47 return { accepted: true }
50 function isRemoteVideoCommentAccepted (_object: {
51 activity: ActivityCreate,
52 commentAP: VideoCommentObject,
55 return { accepted: true }
60 isLocalVideoThreadAccepted,
61 isRemoteVideoAccepted,
62 isRemoteVideoCommentAccepted,
63 isLocalVideoCommentReplyAccepted