diff options
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/actor.ts | 1 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-follow.ts | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index 1e1eab54a..b3fb75421 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts | |||
@@ -314,6 +314,7 @@ async function refreshActorIfNeeded (actor: ActorModel) { | |||
314 | if (result === undefined) throw new Error('Cannot fetch remote actor in refresh actor.') | 314 | if (result === undefined) throw new Error('Cannot fetch remote actor in refresh actor.') |
315 | 315 | ||
316 | return sequelizeTypescript.transaction(async t => { | 316 | return sequelizeTypescript.transaction(async t => { |
317 | logger.info('coucou', result.actor.toJSON()) | ||
317 | updateInstanceWithAnother(actor, result.actor) | 318 | updateInstanceWithAnother(actor, result.actor) |
318 | 319 | ||
319 | if (result.avatarName !== undefined) { | 320 | if (result.avatarName !== undefined) { |
diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts index 5085c5da9..69f5c51b5 100644 --- a/server/lib/activitypub/process/process-follow.ts +++ b/server/lib/activitypub/process/process-follow.ts | |||
@@ -51,6 +51,9 @@ async function follow (actor: ActorModel, targetActorURL: string) { | |||
51 | transaction: t | 51 | transaction: t |
52 | }) | 52 | }) |
53 | 53 | ||
54 | actorFollow.ActorFollower = actor | ||
55 | actorFollow.ActorFollowing = targetActor | ||
56 | |||
54 | if (actorFollow.state !== 'accepted') { | 57 | if (actorFollow.state !== 'accepted') { |
55 | actorFollow.state = 'accepted' | 58 | actorFollow.state = 'accepted' |
56 | await actorFollow.save({ transaction: t }) | 59 | await actorFollow.save({ transaction: t }) |