X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fmoderation.ts;h=0ace2d0218c84dfa836ffb5ba90da0db34ee251f;hb=374e4197386532995dd077df7e3e737dffd71320;hp=b140d5aa9ad054105a7433060c0b850af4f09ae0;hpb=edbc9325462ddf4536775871ebc25e06f46612d1;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/moderation.ts b/server/lib/moderation.ts index b140d5aa9..0ace2d021 100644 --- a/server/lib/moderation.ts +++ b/server/lib/moderation.ts @@ -18,9 +18,9 @@ import { MVideoAccountLightBlacklistAllFiles } from '@server/types/models' import { ActivityCreate } from '../../shared/models/activitypub' -import { VideoTorrentObject } from '../../shared/models/activitypub/objects' +import { VideoObject } from '../../shared/models/activitypub/objects' import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object' -import { VideoCreate, VideoImportCreate } from '../../shared/models/videos' +import { LiveVideoCreate, VideoCreate, VideoImportCreate } from '../../shared/models/videos' import { VideoCommentCreate } from '../../shared/models/videos/video-comment.model' import { UserModel } from '../models/account/user' import { ActorModel } from '../models/activitypub/actor' @@ -43,6 +43,13 @@ function isLocalVideoAccepted (object: { return { accepted: true } } +function isLocalLiveVideoAccepted (object: { + liveVideoBody: LiveVideoCreate + user: UserModel +}): AcceptResult { + return { accepted: true } +} + function isLocalVideoThreadAccepted (_object: { commentBody: VideoCommentCreate video: VideoModel @@ -62,7 +69,7 @@ function isLocalVideoCommentReplyAccepted (_object: { function isRemoteVideoAccepted (_object: { activity: ActivityCreate - videoAP: VideoTorrentObject + videoAP: VideoObject byActor: ActorModel }): AcceptResult { return { accepted: true } @@ -175,6 +182,8 @@ function createAccountAbuse (options: { } export { + isLocalLiveVideoAccepted, + isLocalVideoAccepted, isLocalVideoThreadAccepted, isRemoteVideoAccepted,