withIdempotency() for custom activity idempotency
Addresses issue #441 where activities with the same ID sent to different inboxes were incorrectly deduplicated globally instead of per-inbox. - Add IdempotencyStrategy type with "global", "per-origin", "per-inbox" options - Add IdempotencyKeyCallback type for custom deduplication strategies - Add InboxListenerSetters.withIdempotency() method - Implement three built-in strategies: * "per-origin": deduplicate per receiving server (current default) * "per-inbox": deduplicate per inbox (standard ActivityPub, future default) * "global": deduplicate globally across all inboxes - Add comprehensive test coverage for all strategies - Add documentation section in docs/manual/inbox.md - Include deprecation warning when using default strategy - Cache processed activities for 24 hours using existing KV store - Maintain backward compatibility with "per-origin" default The default will change from "per-origin" to "per-inbox" in Fedify 2.0 to align with standard ActivityPub behavior. Closes https://github.com/fedify-dev/fedify/issues/441 Co-Authored-By:Claude <noreply@anthropic.com>
Loading
Please register or sign in to comment