* Accept Public aliases in URL deserializer
Update deserialize_one_or_many to deserialize recipient URL fields while
accepting `Public` and `as:Public` as aliases for the canonical
ActivityStreams public URL.
Add focused tests for single and array inputs, and verify that unrelated
string fields such as `content` are left unchanged.
https://github.com/LemmyNet/lemmy/issues/6465
* Deduplicate deserialized recipients
Drop repeated recipient URLs after deserialization so equivalent public
aliases such as `Public`, `as:Public`, and the canonical public URL do
not produce duplicate entries.
Update the helper documentation and tests to match the deduplicated
result.
Resolves the following error:
thread 'main' (6023907) panicked at examples/live_federation/main.rs:58:10:
Path segments must not start with `:`. For capture groups, use `{capture}`. If you meant to literally match a segment starting with a colon, call `without_v07_checks` on the router.
These warnings are fixed in the [0.8.x branch][commits] of
`num-bigint-dig`.
warning: the following packages contain code that will be rejected by a future version of Rust: num-bigint-dig v0.8.4
[commits]: https://github.com/dignifiedquire/num-bigint/commits/0-8
* Add hook for incoming activities
* sync version working
* async working
* remove generic
* separate methods
* testing
* use trait to allow references
* Use OriginalUri for axum ActivityData
When the inbox path is under a nested `Router`, the received request has a URI
with the common prefix stripped. This causes incoming signatures to be considered
invalid since the path is different (see https://github.com/LemmyNet/activitypub-federation-rust/issues/107#issuecomment-2767428107)
This commit uses `OriginalUri` for URI extraction instead, which will retrieve
the full URI regardless of router nesting
* Use router nesting for local_federation
With 8c787f5, router nesting is supported correctly in axum
* Fix docs typo (#143)
---------
Co-authored-by: Zami <szgie@proton.me>
Co-authored-by: Felix Ableitner <me@nutomic.com>