diff --git a/src/server/apsystem.ts b/src/server/apsystem.ts index c4d290d..0dc32df 100644 --- a/src/server/apsystem.ts +++ b/src/server/apsystem.ts @@ -362,10 +362,10 @@ export default class ActivityPubSystem { // TODO: Handle other types + index by post if (type === 'Follow') { await this.acceptFollow(fromActor, activity) + await this.hookSystem.dispatchOnApproved(fromActor, activity) } else if (type === 'Undo') { await this.performUndo(fromActor, activity) } - await this.hookSystem.dispatchOnApproved(fromActor, activity) } async rejectActivity (fromActor: string, activityId: string): Promise { @@ -409,6 +409,7 @@ export default class ActivityPubSystem { throw createError(400, 'Undo can only point to activities by same author') } await inbox.remove(object) + await this.hookSystem.dispatchOnApproved(fromActor, activity) // Detect if follow if (existing.type === 'Follow') {