From da854ddd502cd70685ef779c673b9e63757b8aa0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 28 Dec 2017 11:16:08 +0100 Subject: Propagate old comment on new follow --- server/lib/activitypub/actor.ts | 28 ++++---- server/lib/activitypub/process/misc.ts | 79 +++++++++++++++++++--- server/lib/activitypub/process/process-announce.ts | 3 +- server/lib/activitypub/process/process-create.ts | 13 +++- server/lib/activitypub/process/process-delete.ts | 3 +- server/lib/activitypub/process/process-follow.ts | 3 +- server/lib/activitypub/process/process-like.ts | 2 +- server/lib/activitypub/process/process-undo.ts | 3 +- server/lib/activitypub/process/process-update.ts | 4 +- server/lib/activitypub/process/process.ts | 2 +- server/lib/activitypub/send/misc.ts | 2 +- server/lib/activitypub/send/send-create.ts | 2 +- server/lib/activitypub/share.ts | 2 +- server/lib/activitypub/url.ts | 2 +- server/lib/activitypub/videos.ts | 12 +--- server/lib/cache/videos-preview-cache.ts | 3 +- .../activitypub-http-broadcast-handler.ts | 3 +- .../activitypub-http-fetcher-handler.ts | 6 +- .../activitypub-http-job-scheduler.ts | 4 +- .../activitypub-http-unicast-handler.ts | 3 +- server/lib/jobs/job-scheduler.ts | 2 +- .../video-file-optimizer-handler.ts | 3 +- .../video-file-transcoder-handler.ts | 2 +- server/lib/oauth-model.ts | 2 +- 24 files changed, 133 insertions(+), 55 deletions(-) (limited to 'server/lib') diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index ff0a291e8..e590dc72d 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts @@ -3,9 +3,12 @@ import { Transaction } from 'sequelize' import * as url from 'url' import { ActivityPubActor, ActivityPubActorType } from '../../../shared/models/activitypub' import { ActivityPubAttributedTo } from '../../../shared/models/activitypub/objects' -import { createPrivateAndPublicKeys, doRequest, logger, retryTransactionWrapper } from '../../helpers' -import { isRemoteActorValid } from '../../helpers/custom-validators/activitypub' -import { ACTIVITY_PUB, CONFIG, sequelizeTypescript } from '../../initializers' +import { isRemoteActorValid } from '../../helpers/custom-validators/activitypub/actor' +import { retryTransactionWrapper } from '../../helpers/database-utils' +import { logger } from '../../helpers/logger' +import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' +import { doRequest } from '../../helpers/requests' +import { CONFIG, sequelizeTypescript } from '../../initializers' import { AccountModel } from '../../models/account/account' import { ActorModel } from '../../models/activitypub/actor' import { ServerModel } from '../../models/server/server' @@ -115,22 +118,15 @@ async function fetchRemoteActor (actorUrl: string): Promise