1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Refractor activities sending

This commit is contained in:
Chocobozzz 2018-09-14 16:51:35 +02:00
parent d61b817890
commit a2377d15ee
No known key found for this signature in database
GPG key ID: 583A612D890159BE
11 changed files with 140 additions and 155 deletions

View file

@ -41,6 +41,8 @@ async function processDeleteActivity (activity: ActivityDelete) {
{
const videoInstance = await VideoModel.loadByUrlAndPopulateAccount(objectUrl)
if (videoInstance) {
if (videoInstance.isOwned()) throw new Error(`Remote instance cannot delete owned video ${videoInstance.url}.`)
return retryTransactionWrapper(processDeleteVideo, actor, videoInstance)
}
}