]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/send-update.ts
Update server dependencies
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / send-update.ts
index 3a5cc185367e854ebe05bee2f27028eba121397b..44e0e1161ed239014838a0797a22bf92d2e1bf53 100644 (file)
@@ -12,10 +12,10 @@ import { VideoCaptionModel } from '../../../models/video/video-caption'
 import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
 import { getServerActor } from '../../../helpers/utils'
 import {
-  MAccountActor,
+  MAccountDefault,
   MActor,
   MActorLight,
-  MChannelActor,
+  MChannelDefault,
   MVideoAP,
   MVideoAPWithoutCaption,
   MVideoPlaylistFull,
@@ -49,13 +49,13 @@ async function sendUpdateVideo (videoArg: MVideoAPWithoutCaption, t: Transaction
   return broadcastToFollowers(updateActivity, byActor, actorsInvolved, t)
 }
 
-async function sendUpdateActor (accountOrChannel: MAccountActor | MChannelActor, t: Transaction) {
+async function sendUpdateActor (accountOrChannel: MChannelDefault | MAccountDefault, t: Transaction) {
   const byActor = accountOrChannel.Actor
 
   logger.info('Creating job to update actor %s.', byActor.url)
 
   const url = getUpdateActivityPubUrl(byActor.url, byActor.updatedAt.toISOString())
-  const accountOrChannelObject = accountOrChannel.toActivityPubObject()
+  const accountOrChannelObject = (accountOrChannel as any).toActivityPubObject() // FIXME: typescript bug?
   const audience = getAudience(byActor)
   const updateActivity = buildUpdateActivity(url, byActor, accountOrChannelObject, audience)