Unverified Commit cbc8aca7 authored by Hong Minhee's avatar Hong Minhee
Browse files

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: default avatarClaude <noreply@anthropic.com>
parent 45b856c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment