mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06: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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user