]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
Handle follow/accept
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index 10ae5097c3cfbd1f008e56e078252b8b5aec2c82..ca71da375811f316245d071b24d303cfa7e49187 100644 (file)
@@ -45,6 +45,7 @@ import { addMethodsToModel, getSort } from '../utils'
 import { TagInstance } from './tag-interface'
 import { VideoFileInstance, VideoFileModel } from './video-file-interface'
 import { VideoAttributes, VideoInstance, VideoMethods } from './video-interface'
+import { sendDeleteVideo } from '../../lib/activitypub/send-request'
 
 const Buffer = safeBuffer.Buffer
 
@@ -363,13 +364,9 @@ function afterDestroy (video: VideoInstance) {
   )
 
   if (video.isOwned()) {
-    const removeVideoToFriendsParams = {
-      uuid: video.uuid
-    }
-
     tasks.push(
-      video.removePreview()
-      // FIXME: remove video for followers
+      video.removePreview(),
+      sendDeleteVideo(video, undefined)
     )
 
     // Remove physical files and torrents