]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/video-rates.ts
Add import finished and video published notifs
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / video-rates.ts
index 1854b44c4e1b9a1553ddb2cd735ceb3e335787d2..2cce67f0c81194e1d018b0f10e298992ad3563a5 100644 (file)
@@ -9,7 +9,7 @@ import { AccountVideoRateModel } from '../../models/account/account-video-rate'
 import { logger } from '../../helpers/logger'
 import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers'
 import { doRequest } from '../../helpers/requests'
-import { checkUrlsSameHost, getActorUrl } from '../../helpers/activitypub'
+import { checkUrlsSameHost, getAPUrl } from '../../helpers/activitypub'
 import { ActorModel } from '../../models/activitypub/actor'
 import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from './url'
 
@@ -26,7 +26,7 @@ async function createRates (ratesUrl: string[], video: VideoModel, rate: VideoRa
       })
       if (!body || !body.actor) throw new Error('Body or body actor is invalid')
 
-      const actorUrl = getActorUrl(body.actor)
+      const actorUrl = getAPUrl(body.actor)
       if (checkUrlsSameHost(actorUrl, rateUrl) !== true) {
         throw new Error(`Rate url ${rateUrl} has not the same host than actor url ${actorUrl}`)
       }