X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fjob-queue%2Fhandlers%2Factivitypub-follow.ts;h=82c95be800292f2000db7afda50ad0715eb72288;hb=d487a997c80fafe6067016c6cd8e8afd6141baa3;hp=e467c5b1b12a1f0f7f1cf8cb469440e1a6445ce8;hpb=0dd57e4d43b06a70a45b77f2006f805f9a42116c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/job-queue/handlers/activitypub-follow.ts b/server/lib/job-queue/handlers/activitypub-follow.ts index e467c5b1b..82c95be80 100644 --- a/server/lib/job-queue/handlers/activitypub-follow.ts +++ b/server/lib/job-queue/handlers/activitypub-follow.ts @@ -10,15 +10,9 @@ import { ActorFollowModel } from '../../../models/activitypub/actor-follow' import { ActorModel } from '../../../models/activitypub/actor' import { Notifier } from '../../notifier' import { sequelizeTypescript } from '../../../initializers/database' -import { MActor, MActorFollowActors, MActorFull } from '../../../typings/models' - -export type ActivitypubFollowPayload = { - followerActorId: number - name: string - host: string - isAutoFollow?: boolean - assertIsChannel?: boolean -} +import { MActor, MActorFollowActors, MActorFull } from '../../../types/models' +import { ActivitypubFollowPayload } from '@shared/models' +import { getLocalActorFollowActivityPubUrl } from '@server/lib/activitypub/url' async function processActivityPubFollow (job: Bull.Job) { const payload = job.data as ActivitypubFollowPayload @@ -68,6 +62,7 @@ async function follow (fromActor: MActor, targetActor: MActorFull, isAutoFollow }, defaults: { state, + url: getLocalActorFollowActivityPubUrl(fromActor, targetActor), actorId: fromActor.id, targetActorId: targetActor.id },