]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/send-like.ts
Fix incorrect IDs in AP federation
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / send-like.ts
index e84a6f98b08112a7efd80ab7d081a365b0034a5a..ed6dfcf56d398f46291ad43ef08dc375a9f012be 100644 (file)
@@ -1,16 +1,16 @@
 import { Transaction } from 'sequelize'
 import { ActivityAudience, ActivityLike } from '../../../../shared/models/activitypub'
-import { getVideoLikeActivityPubUrl } from '../url'
+import { getVideoLikeActivityPubUrlByLocalActor } from '../url'
 import { sendVideoRelatedActivity } from './utils'
 import { audiencify, getAudience } from '../audience'
 import { logger } from '../../../helpers/logger'
-import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../typings/models'
+import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models'
 
-async function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) {
+function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) {
   logger.info('Creating job to like %s.', video.url)
 
   const activityBuilder = (audience: ActivityAudience) => {
-    const url = getVideoLikeActivityPubUrl(byActor, video)
+    const url = getVideoLikeActivityPubUrlByLocalActor(byActor, video)
 
     return buildLikeActivity(url, byActor, video, audience)
   }