mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Don't forward view, send updates instead
To avoid inconsistencies in the federation, now the origin server will tell other instances what is the correct number of views
This commit is contained in:
parent
650e3d5ce3
commit
030177d246
4 changed files with 17 additions and 17 deletions
|
@ -405,7 +405,11 @@ async function viewVideo (req: express.Request, res: express.Response) {
|
|||
|
||||
const serverActor = await getServerActor()
|
||||
|
||||
await sendCreateView(serverActor, videoInstance, undefined)
|
||||
// Send the event to the origin server
|
||||
// If we own the video, we'll send an update event when we'll process the views (in our job queue)
|
||||
if (videoInstance.isOwned() === false) {
|
||||
await sendCreateView(serverActor, videoInstance, undefined)
|
||||
}
|
||||
|
||||
return res.status(204).end()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue