aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/process
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-24 10:28:57 +0200
committerChocobozzz <me@florianbigard.com>2019-04-24 16:26:22 +0200
commit9cc8d43e37a61709e7275c2a799bdf976dd940ca (patch)
tree0d8d8967d39d6ecebbc480be53c528e696ce30e7 /server/lib/activitypub/process
parent2fb5b3a55aeebcc77f4b3a0c029bbf0738ef0063 (diff)
downloadPeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.tar.gz
PeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.tar.zst
PeerTube-9cc8d43e37a61709e7275c2a799bdf976dd940ca.zip
Add migrations
Diffstat (limited to 'server/lib/activitypub/process')
-rw-r--r--server/lib/activitypub/process/process-undo.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/activitypub/process/process-undo.ts b/server/lib/activitypub/process/process-undo.ts
index ed0177a67..2d48848fe 100644
--- a/server/lib/activitypub/process/process-undo.ts
+++ b/server/lib/activitypub/process/process-undo.ts
@@ -108,7 +108,10 @@ async function processUndoCacheFile (byActor: ActorModel, activity: ActivityUndo
108 108
109 return sequelizeTypescript.transaction(async t => { 109 return sequelizeTypescript.transaction(async t => {
110 const cacheFile = await VideoRedundancyModel.loadByUrl(cacheFileObject.id) 110 const cacheFile = await VideoRedundancyModel.loadByUrl(cacheFileObject.id)
111 if (!cacheFile) throw new Error('Unknown video cache ' + cacheFileObject.id) 111 if (!cacheFile) {
112 logger.debug('Cannot undo unknown video cache %s.', cacheFileObject.id)
113 return
114 }
112 115
113 if (cacheFile.actorId !== byActor.id) throw new Error('Cannot delete redundancy ' + cacheFile.url + ' of another actor.') 116 if (cacheFile.actorId !== byActor.id) throw new Error('Cannot delete redundancy ' + cacheFile.url + ' of another actor.')
114 117