diff options
Diffstat (limited to 'server/lib/activitypub/process/process-like.ts')
-rw-r--r-- | server/lib/activitypub/process/process-like.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/lib/activitypub/process/process-like.ts b/server/lib/activitypub/process/process-like.ts index 8b97aae55..5b2ab4b66 100644 --- a/server/lib/activitypub/process/process-like.ts +++ b/server/lib/activitypub/process/process-like.ts | |||
@@ -43,6 +43,10 @@ async function processLikeVideo (byActor: ActorModel, activity: ActivityLike) { | |||
43 | 43 | ||
44 | await video.increment('likes', { transaction: t }) | 44 | await video.increment('likes', { transaction: t }) |
45 | 45 | ||
46 | if (existingRate && existingRate.type === 'dislike') { | ||
47 | await video.decrement('dislikes', { 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 ] |