aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
authorbuoyantair <buoyantair@protonmail.com>2018-11-16 02:37:16 +0530
committerbuoyantair <buoyantair@protonmail.com>2018-11-16 02:37:16 +0530
commitae28cdf327d782e629379eee1999096ca2a5d74b (patch)
treebfe0d4b3a232d75161fe5bba9196553a388fc02a /server/controllers/api/videos/index.ts
parentd4681c0074ba51c62a3aeb9fb3f2cd071dd21e32 (diff)
parent8cf998733496d44fa564e2e252356b871756c984 (diff)
downloadPeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.gz
PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.tar.zst
PeerTube-ae28cdf327d782e629379eee1999096ca2a5d74b.zip
Merge from upstream
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 664154406..e654bdd09 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -405,7 +405,11 @@ async function viewVideo (req: express.Request, res: express.Response) {
405 405
406 const serverActor = await getServerActor() 406 const serverActor = await getServerActor()
407 407
408 await sendCreateView(serverActor, videoInstance, undefined) 408 // Send the event to the origin server
409 // If we own the video, we'll send an update event when we'll process the views (in our job queue)
410 if (videoInstance.isOwned() === false) {
411 await sendCreateView(serverActor, videoInstance, undefined)
412 }
409 413
410 return res.status(204).end() 414 return res.status(204).end()
411} 415}