]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/send-flag.ts
Add ability to override client assets : logo - favicon - PWA icons - PWA manifest...
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / send-flag.ts
index 5ae1614ab63d8c5f6467249bef01efc6617c91f6..3a1fe08122e95a5547eafffdc36b81bd290b9f19 100644 (file)
@@ -4,10 +4,10 @@ import { logger } from '../../../helpers/logger'
 import { ActivityAudience, ActivityFlag } from '../../../../shared/models/activitypub'
 import { audiencify, getAudience } from '../audience'
 import { Transaction } from 'sequelize'
-import { MActor, MVideoFullLight } from '../../../typings/models'
-import { MVideoAbuseVideo } from '../../../typings/models/video'
+import { MActor, MVideoFullLight } from '../../../types/models'
+import { MVideoAbuseVideo } from '../../../types/models/video'
 
-async function sendVideoAbuse (byActor: MActor, videoAbuse: MVideoAbuseVideo, video: MVideoFullLight, t: Transaction) {
+function sendVideoAbuse (byActor: MActor, videoAbuse: MVideoAbuseVideo, video: MVideoFullLight, t: Transaction) {
   if (!video.VideoChannel.Account.Actor.serverId) return // Local user
 
   const url = getVideoAbuseActivityPubUrl(videoAbuse)
@@ -18,7 +18,7 @@ async function sendVideoAbuse (byActor: MActor, videoAbuse: MVideoAbuseVideo, vi
   const audience = { to: [ video.VideoChannel.Account.Actor.url ], cc: [] }
   const flagActivity = buildFlagActivity(url, byActor, videoAbuse, audience)
 
-  t.afterCommit(() => unicastTo(flagActivity, byActor, video.VideoChannel.Account.Actor.sharedInboxUrl))
+  t.afterCommit(() => unicastTo(flagActivity, byActor, video.VideoChannel.Account.Actor.getSharedInbox()))
 }
 
 function buildFlagActivity (url: string, byActor: MActor, videoAbuse: MVideoAbuseVideo, audience: ActivityAudience): ActivityFlag {