Chocobozzz/PeerTube

View on GitHub
server/core/lib/activitypub/process/process-follow.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function processFollow has 37 lines of code (exceeds 25 allowed). Consider refactoring.
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')
Severity: Minor
Found in server/core/lib/activitypub/process/process-follow.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status