]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/moderation.ts
Process remaining segment hashes on live ending
[github/Chocobozzz/PeerTube.git] / server / lib / moderation.ts
index 4fc9cd747609a22d0d612caafc8e6c1fb944b566..0ace2d0218c84dfa836ffb5ba90da0db34ee251f 100644 (file)
@@ -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,
@@ -213,7 +222,7 @@ async function createAbuse (options: {
     await sendAbuse(reporterAccount.Actor, abuseInstance, abuseInstance.FlaggedAccount, transaction)
   }
 
-  const abuseJSON = abuseInstance.toFormattedJSON()
+  const abuseJSON = abuseInstance.toFormattedAdminJSON()
   auditLogger.create(reporterAccount.Actor.getIdentifier(), new AbuseAuditView(abuseJSON))
 
   Notifier.Instance.notifyOnNewAbuse({