Skip to content

Commit

Permalink
Call approved hook for undo activity
Browse files Browse the repository at this point in the history
  • Loading branch information
RangerMauve committed Feb 29, 2024
1 parent adaba10 commit 969072a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/apsystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
Expand Down Expand Up @@ -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') {
Expand Down

0 comments on commit 969072a

Please sign in to comment.