X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fsend%2Fsend-update.ts;h=44e0e1161ed239014838a0797a22bf92d2e1bf53;hb=d5d9b6d7bfb7e9426b6462f7fdf285df39eea820;hp=3a5cc185367e854ebe05bee2f27028eba121397b;hpb=453e83ea5d81d203ba34bc43cd5c2c750ba40568;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/send/send-update.ts b/server/lib/activitypub/send/send-update.ts index 3a5cc1853..44e0e1161 100644 --- a/server/lib/activitypub/send/send-update.ts +++ b/server/lib/activitypub/send/send-update.ts @@ -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)