MAbuseFull,
MAccountDefault,
MAccountLight,
+ MComment,
MCommentAbuseAccountVideo,
MCommentOwnerVideo,
MUser,
MVideoAbuseVideoFull,
MVideoAccountLightBlacklistAllFiles
} from '@server/types/models'
-import { ActivityCreate } from '../../shared/models/activitypub'
-import { VideoObject } from '../../shared/models/activitypub/objects'
-import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object'
import { LiveVideoCreate, VideoCreate, VideoImportCreate } from '../../shared/models/videos'
import { VideoCommentCreate } from '../../shared/models/videos/comment'
-import { ActorModel } from '../models/actor/actor'
import { UserModel } from '../models/user/user'
import { VideoModel } from '../models/video/video'
import { VideoCommentModel } from '../models/video/video-comment'
errorMessage?: string
}
-// Can be filtered by plugins
+// ---------------------------------------------------------------------------
+
+// Stub function that can be filtered by plugins
function isLocalVideoAccepted (object: {
videoBody: VideoCreate
videoFile: VideoUploadFile
return { accepted: true }
}
+// ---------------------------------------------------------------------------
+
+// Stub function that can be filtered by plugins
function isLocalLiveVideoAccepted (object: {
liveVideoBody: LiveVideoCreate
user: UserModel
return { accepted: true }
}
+// ---------------------------------------------------------------------------
+
+// Stub function that can be filtered by plugins
function isLocalVideoThreadAccepted (_object: {
commentBody: VideoCommentCreate
video: VideoModel
return { accepted: true }
}
+// Stub function that can be filtered by plugins
function isLocalVideoCommentReplyAccepted (_object: {
commentBody: VideoCommentCreate
parentComment: VideoCommentModel
return { accepted: true }
}
-function isRemoteVideoAccepted (_object: {
- activity: ActivityCreate
- videoAP: VideoObject
- byActor: ActorModel
-}): AcceptResult {
- return { accepted: true }
-}
+// ---------------------------------------------------------------------------
+// Stub function that can be filtered by plugins
function isRemoteVideoCommentAccepted (_object: {
- activity: ActivityCreate
- commentAP: VideoCommentObject
- byActor: ActorModel
+ comment: MComment
}): AcceptResult {
return { accepted: true }
}
+// ---------------------------------------------------------------------------
+
+// Stub function that can be filtered by plugins
function isPreImportVideoAccepted (object: {
videoImportBody: VideoImportCreate
user: MUser
return { accepted: true }
}
+// Stub function that can be filtered by plugins
function isPostImportVideoAccepted (object: {
videoFilePath: PathLike
videoFile: VideoFileModel
return { accepted: true }
}
+// ---------------------------------------------------------------------------
+
async function createVideoAbuse (options: {
baseAbuse: FilteredModelAttributes<AbuseModel>
videoInstance: MVideoAccountLightBlacklistAllFiles
})
}
+// ---------------------------------------------------------------------------
+
export {
isLocalLiveVideoAccepted,
isLocalVideoAccepted,
isLocalVideoThreadAccepted,
- isRemoteVideoAccepted,
isRemoteVideoCommentAccepted,
isLocalVideoCommentReplyAccepted,
isPreImportVideoAccepted,