aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/process
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-30 13:51:53 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-30 13:51:53 +0100
commitf00984c0077e9b666fe8005452768e53d1c3f421 (patch)
treed0539433f1ede6818664fade3ade5d2d536f016d /server/lib/activitypub/process
parent4f49137101a665f6a76bd8159a175a2aa680af96 (diff)
downloadPeerTube-f00984c0077e9b666fe8005452768e53d1c3f421.tar.gz
PeerTube-f00984c0077e9b666fe8005452768e53d1c3f421.tar.zst
PeerTube-f00984c0077e9b666fe8005452768e53d1c3f421.zip
Fix conflict rate serializations
Diffstat (limited to 'server/lib/activitypub/process')
-rw-r--r--server/lib/activitypub/process/process-create.ts2
-rw-r--r--server/lib/activitypub/process/process-like.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts
index c88082bbf..4740dc432 100644
--- a/server/lib/activitypub/process/process-create.ts
+++ b/server/lib/activitypub/process/process-create.ts
@@ -63,7 +63,7 @@ function createVideoDislike (byAccount: AccountInstance, activity: ActivityCreat
63 defaults: rate, 63 defaults: rate,
64 transaction: t 64 transaction: t
65 }) 65 })
66 await video.increment('dislikes', { transaction: t }) 66 if (created === true) await video.increment('dislikes', { transaction: t })
67 67
68 if (video.isOwned() && created === true) { 68 if (video.isOwned() && created === true) {
69 // Don't resend the activity to the sender 69 // Don't resend the activity to the sender
diff --git a/server/lib/activitypub/process/process-like.ts b/server/lib/activitypub/process/process-like.ts
index 0347f95be..5f2ffe7ea 100644
--- a/server/lib/activitypub/process/process-like.ts
+++ b/server/lib/activitypub/process/process-like.ts
@@ -46,7 +46,7 @@ function createVideoLike (byAccount: AccountInstance, activity: ActivityLike) {
46 defaults: rate, 46 defaults: rate,
47 transaction: t 47 transaction: t
48 }) 48 })
49 await video.increment('likes', { transaction: t }) 49 if (created === true) await video.increment('likes', { transaction: t })
50 50
51 if (video.isOwned() && created === true) { 51 if (video.isOwned() && created === true) {
52 // Don't resend the activity to the sender 52 // Don't resend the activity to the sender