- accountId: byAccount.id
- }
- const [ , created ] = await AccountVideoRateModel.findOrCreate({
- where: rate,
- defaults: Object.assign({}, rate, { url: getVideoLikeActivityPubUrl(byActor, video) }),
- transaction: t
- })
- if (created === true) await video.increment('likes', { transaction: t })
-
- if (video.isOwned() && created === true) {
+ accountId: byAccount.id,
+ url
+ }, { transaction: t })
+
+ await video.increment('likes', { transaction: t })
+
+ if (video.isOwned()) {