@BeforeDestroy
static async removeFile (instance: VideoRedundancyModel) {
- // Not us
- if (!instance.strategy) return
+ if (!instance.isOwned()) return
const videoFile = await VideoFileModel.loadWithVideo(instance.videoFileId)
}))
}
+ isOwned () {
+ return !!this.strategy
+ }
+
toActivityPubObject (): CacheFileObject {
return {
id: this.url,