- if (dislikesToIncrement !== 0) {
- eventsParams.push({
- videoId: videoInstance.id,
- type: REQUEST_VIDEO_EVENT_TYPES.DISLIKES,
- count: dislikesToIncrement
- })
- }
-
- addEventsToRemoteVideo(eventsParams, t, function (err) {
- return callback(err, t, likesToIncrement, dislikesToIncrement)
- })
- },
-
- function sendQaduToFriendsIfNeeded (t, likesToIncrement, dislikesToIncrement, callback) {
- // We do not own the video, there is no need to send a quick and dirty update to friends
- // Our rate was already sent by the addEvent function
- if (videoInstance.isOwned() === false) return callback(null, t)
-
- const qadusParams = []
-
- if (likesToIncrement !== 0) {
- qadusParams.push({
- videoId: videoInstance.id,
- type: REQUEST_VIDEO_QADU_TYPES.LIKES
- })
- }
-
- if (dislikesToIncrement !== 0) {
- qadusParams.push({
- videoId: videoInstance.id,
- type: REQUEST_VIDEO_QADU_TYPES.DISLIKES
- })
- }