X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=server%2Flib%2Fjob-queue%2Fhandlers%2Factivitypub-follow.ts;h=7a4f85f8b5fd32e153223bf2d5588ce0522bc308;hb=26d6bf6533023326fa017812cf31bbe20c752d36;hp=94eeed4c0f2db13fdd328b75748ddd8693f2ce1d;hpb=2c0ccd4b3f5ec5633879e6b42cd5175e4de207cc;p=oweals%2Fpeertube.git diff --git a/server/lib/job-queue/handlers/activitypub-follow.ts b/server/lib/job-queue/handlers/activitypub-follow.ts index 94eeed4c0..7a4f85f8b 100644 --- a/server/lib/job-queue/handlers/activitypub-follow.ts +++ b/server/lib/job-queue/handlers/activitypub-follow.ts @@ -10,15 +10,8 @@ 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' async function processActivityPubFollow (job: Bull.Job) { const payload = job.data as ActivitypubFollowPayload @@ -36,7 +29,7 @@ async function processActivityPubFollow (job: Bull.Job) { } if (payload.assertIsChannel && !targetActor.VideoChannel) { - logger.warn('Do not follow %s@%s because it is not a channel.', name, host) + logger.warn('Do not follow %s@%s because it is not a channel.', payload.name, host) return }