aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/moderation.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/moderation.ts')
-rw-r--r--server/lib/moderation.ts24
1 files changed, 22 insertions, 2 deletions
diff --git a/server/lib/moderation.ts b/server/lib/moderation.ts
index 55f7a985d..4afebb32a 100644
--- a/server/lib/moderation.ts
+++ b/server/lib/moderation.ts
@@ -1,12 +1,15 @@
1import { VideoModel } from '../models/video/video' 1import { VideoModel } from '../models/video/video'
2import { VideoCommentModel } from '../models/video/video-comment' 2import { VideoCommentModel } from '../models/video/video-comment'
3import { VideoCommentCreate } from '../../shared/models/videos/video-comment.model' 3import { VideoCommentCreate } from '../../shared/models/videos/video-comment.model'
4import { VideoCreate } from '../../shared/models/videos' 4import { VideoCreate, VideoImportCreate } from '../../shared/models/videos'
5import { UserModel } from '../models/account/user' 5import { UserModel } from '../models/account/user'
6import { VideoTorrentObject } from '../../shared/models/activitypub/objects' 6import { VideoTorrentObject } from '../../shared/models/activitypub/objects'
7import { ActivityCreate } from '../../shared/models/activitypub' 7import { ActivityCreate } from '../../shared/models/activitypub'
8import { ActorModel } from '../models/activitypub/actor' 8import { ActorModel } from '../models/activitypub/actor'
9import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object' 9import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object'
10import { VideoFileModel } from '@server/models/video/video-file'
11import { PathLike } from 'fs-extra'
12import { MUser } from '@server/typings/models'
10 13
11export type AcceptResult = { 14export type AcceptResult = {
12 accepted: boolean 15 accepted: boolean
@@ -55,10 +58,27 @@ function isRemoteVideoCommentAccepted (_object: {
55 return { accepted: true } 58 return { accepted: true }
56} 59}
57 60
61function isPreImportVideoAccepted (object: {
62 videoImportBody: VideoImportCreate
63 user: MUser
64}): AcceptResult {
65 return { accepted: true }
66}
67
68function isPostImportVideoAccepted (object: {
69 videoFilePath: PathLike
70 videoFile: VideoFileModel
71 user: MUser
72}): AcceptResult {
73 return { accepted: true }
74}
75
58export { 76export {
59 isLocalVideoAccepted, 77 isLocalVideoAccepted,
60 isLocalVideoThreadAccepted, 78 isLocalVideoThreadAccepted,
61 isRemoteVideoAccepted, 79 isRemoteVideoAccepted,
62 isRemoteVideoCommentAccepted, 80 isRemoteVideoCommentAccepted,
63 isLocalVideoCommentReplyAccepted 81 isLocalVideoCommentReplyAccepted,
82 isPreImportVideoAccepted,
83 isPostImportVideoAccepted
64} 84}