diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-01 14:19:18 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-01 14:19:18 +0200 |
commit | 29d4e1375fdac88595347184c3d1b214804794b0 (patch) | |
tree | 4f66651218c1a7dee579d006e6e396f141382228 /server/lib/activitypub/process/process-dislike.ts | |
parent | 16b5525950c27172b8426e03cbb1c59794cfc44c (diff) | |
download | PeerTube-29d4e1375fdac88595347184c3d1b214804794b0.tar.gz PeerTube-29d4e1375fdac88595347184c3d1b214804794b0.tar.zst PeerTube-29d4e1375fdac88595347184c3d1b214804794b0.zip |
Fix HLS transcoding
Diffstat (limited to 'server/lib/activitypub/process/process-dislike.ts')
-rw-r--r-- | server/lib/activitypub/process/process-dislike.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/lib/activitypub/process/process-dislike.ts b/server/lib/activitypub/process/process-dislike.ts index ed8afd3d2..c46180617 100644 --- a/server/lib/activitypub/process/process-dislike.ts +++ b/server/lib/activitypub/process/process-dislike.ts | |||
@@ -43,6 +43,10 @@ async function processDislike (activity: ActivityCreate | ActivityDislike, byAct | |||
43 | 43 | ||
44 | await video.increment('dislikes', { transaction: t }) | 44 | await video.increment('dislikes', { transaction: t }) |
45 | 45 | ||
46 | if (existingRate && existingRate.type === 'like') { | ||
47 | await video.decrement('likes', { transaction: t }) | ||
48 | } | ||
49 | |||
46 | if (video.isOwned()) { | 50 | if (video.isOwned()) { |
47 | // Don't resend the activity to the sender | 51 | // Don't resend the activity to the sender |
48 | const exceptions = [ byActor ] | 52 | const exceptions = [ byActor ] |