server/core/lib/activitypub/process/process-follow.ts
Function processFollow
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function processFollow (byActor: MActorSignature, activityId: string, targetActorURL: string) {
const { actorFollow, created, targetActor } = await sequelizeTypescript.transaction(async t => {
const targetActor = await ActorModel.loadByUrlAndPopulateAccountAndChannel(targetActorURL, t)
if (!targetActor) throw new Error('Unknown actor')