diff options
Diffstat (limited to 'server/lib/activitypub/process-update.ts')
-rw-r--r-- | server/lib/activitypub/process-update.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/process-update.ts b/server/lib/activitypub/process-update.ts index cd8a4b8e2..4aefd1b9b 100644 --- a/server/lib/activitypub/process-update.ts +++ b/server/lib/activitypub/process-update.ts | |||
@@ -50,14 +50,14 @@ async function updateRemoteVideo (account: AccountInstance, videoAttributesToUpd | |||
50 | transaction: t | 50 | transaction: t |
51 | } | 51 | } |
52 | 52 | ||
53 | const videoInstance = await db.Video.loadByUrl(videoAttributesToUpdate.id, t) | 53 | const videoInstance = await db.Video.loadByUrlAndPopulateAccount(videoAttributesToUpdate.id, t) |
54 | if (!videoInstance) throw new Error('Video ' + videoAttributesToUpdate.id + ' not found.') | 54 | if (!videoInstance) throw new Error('Video ' + videoAttributesToUpdate.id + ' not found.') |
55 | 55 | ||
56 | if (videoInstance.VideoChannel.Account.id !== account.id) { | 56 | if (videoInstance.VideoChannel.Account.id !== account.id) { |
57 | throw new Error('Account ' + account.url + ' does not own video channel ' + videoInstance.VideoChannel.url) | 57 | throw new Error('Account ' + account.url + ' does not own video channel ' + videoInstance.VideoChannel.url) |
58 | } | 58 | } |
59 | 59 | ||
60 | const videoData = await videoActivityObjectToDBAttributes(videoInstance.VideoChannel, videoAttributesToUpdate, t) | 60 | const videoData = await videoActivityObjectToDBAttributes(videoInstance.VideoChannel, videoAttributesToUpdate) |
61 | videoInstance.set('name', videoData.name) | 61 | videoInstance.set('name', videoData.name) |
62 | videoInstance.set('category', videoData.category) | 62 | videoInstance.set('category', videoData.category) |
63 | videoInstance.set('licence', videoData.licence) | 63 | videoInstance.set('licence', videoData.licence) |