refactor: extract activity dispatcher middleware to eliminate handler boilerplate #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closed:
activitypub_federationowns theActivityHandlertrait, so k-ap can't introduce a true middleware layer without fighting the framework. The guard boilerplate is only 2 lines per handler viacheck_guards. The remaining per-handler logic (actor resolution, user lookup, logging) genuinely differs between activity types — it's not duplicated, it's type-specific. The cost of the abstraction outweighs the boilerplate savings.