]> Untitled Git - lemmy.git/commit
Apub inbox rewrite (#1652)
authorNutomic <me@nutomic.com>
Sat, 17 Jul 2021 16:08:46 +0000 (16:08 +0000)
committerGitHub <noreply@github.com>
Sat, 17 Jul 2021 16:08:46 +0000 (12:08 -0400)
commitc7de1fcf24185c7f72161bf7d3536ccb7c4e96c5
treea4ee398e3327ce6da2474f0d0375378a53ce6c87
parentf4c7c2bf28fa0ea0ee80d4e0b8a1340c9576e0f2
Apub inbox rewrite (#1652)

* start to implement apub inbox routing lib

* got something that almost works

* it compiles!

* implemented some more

* move library code to separate crate (most of it)

* convert private message handlers

* convert all comment receivers (except undo comment)

* convert post receiver

* add verify trait

* convert community receivers

* add cc field for all activities which i forgot before

* convert inbox functions, add missing checks

* convert undo like/dislike receivers

* convert undo_delete and undo_remove receivers

* move block/unblock activities

* convert remaining activity receivers

* reimplement http signature verification and other checks

* also use actor type for routing, VerifyActivity and SendActivity traits

* cleanup and restructure apub_receive code

* wip: try to fix activity routing

* implement a (very bad) derive macro for activityhandler

* working activity routing!

* rework pm verify(), fix tests and confirm manually

also remove inbox username check which was broken

* rework following verify(), fix tests and test manually

* fix post/comment create/update, rework voting

* Rewrite remove/delete post/comment, fix tests, test manually

* Rework and fix (un)block user, announce, update post

* some code cleanup

* rework delete/remove activity receivers (still quite messy)

* rewrite, test and fix add/remove mod, update community handlers

* add docs for ActivityHandler derive macro

* dont try to compile macro comments
71 files changed:
Cargo.lock
Cargo.toml
api_tests/prepare-drone-federation-test.sh
crates/apub/src/activities/send/community.rs
crates/apub/src/activities/send/person.rs
crates/apub/src/activity_queue.rs
crates/apub/src/extensions/signatures.rs
crates/apub/src/fetcher/objects.rs
crates/apub/src/lib.rs
crates/apub/src/objects/comment.rs
crates/apub_lib/Cargo.toml [new file with mode: 0644]
crates/apub_lib/src/lib.rs [new file with mode: 0644]
crates/apub_lib_derive/Cargo.toml [new file with mode: 0644]
crates/apub_lib_derive/src/lib.rs [new file with mode: 0644]
crates/apub_receive/Cargo.toml
crates/apub_receive/src/activities/comment/create.rs [new file with mode: 0644]
crates/apub_receive/src/activities/comment/mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/comment/remove.rs [new file with mode: 0644]
crates/apub_receive/src/activities/comment/undo_remove.rs [new file with mode: 0644]
crates/apub_receive/src/activities/comment/update.rs [new file with mode: 0644]
crates/apub_receive/src/activities/community/add_mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/community/announce.rs [new file with mode: 0644]
crates/apub_receive/src/activities/community/block_user.rs [new file with mode: 0644]
crates/apub_receive/src/activities/community/mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/community/undo_block_user.rs [new file with mode: 0644]
crates/apub_receive/src/activities/community/update.rs [new file with mode: 0644]
crates/apub_receive/src/activities/deletion/delete.rs [new file with mode: 0644]
crates/apub_receive/src/activities/deletion/mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/deletion/undo_delete.rs [new file with mode: 0644]
crates/apub_receive/src/activities/following/accept.rs [new file with mode: 0644]
crates/apub_receive/src/activities/following/follow.rs [new file with mode: 0644]
crates/apub_receive/src/activities/following/mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/following/undo.rs [new file with mode: 0644]
crates/apub_receive/src/activities/mod.rs
crates/apub_receive/src/activities/post/create.rs [new file with mode: 0644]
crates/apub_receive/src/activities/post/mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/post/update.rs [new file with mode: 0644]
crates/apub_receive/src/activities/private_message/create.rs [new file with mode: 0644]
crates/apub_receive/src/activities/private_message/delete.rs [new file with mode: 0644]
crates/apub_receive/src/activities/private_message/mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/private_message/undo_delete.rs [new file with mode: 0644]
crates/apub_receive/src/activities/private_message/update.rs [new file with mode: 0644]
crates/apub_receive/src/activities/receive/comment.rs [deleted file]
crates/apub_receive/src/activities/receive/comment_undo.rs [deleted file]
crates/apub_receive/src/activities/receive/community.rs [deleted file]
crates/apub_receive/src/activities/receive/mod.rs [deleted file]
crates/apub_receive/src/activities/receive/post.rs [deleted file]
crates/apub_receive/src/activities/receive/post_undo.rs [deleted file]
crates/apub_receive/src/activities/receive/private_message.rs [deleted file]
crates/apub_receive/src/activities/removal/mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/removal/remove.rs [new file with mode: 0644]
crates/apub_receive/src/activities/removal/undo_remove.rs [new file with mode: 0644]
crates/apub_receive/src/activities/voting/dislike.rs [new file with mode: 0644]
crates/apub_receive/src/activities/voting/like.rs [new file with mode: 0644]
crates/apub_receive/src/activities/voting/mod.rs [new file with mode: 0644]
crates/apub_receive/src/activities/voting/undo_dislike.rs [new file with mode: 0644]
crates/apub_receive/src/activities/voting/undo_like.rs [new file with mode: 0644]
crates/apub_receive/src/http/community.rs
crates/apub_receive/src/http/inbox_enums.rs [new file with mode: 0644]
crates/apub_receive/src/http/mod.rs
crates/apub_receive/src/http/person.rs
crates/apub_receive/src/http/routes.rs [moved from crates/apub_receive/src/routes.rs with 83% similarity]
crates/apub_receive/src/inbox/community_inbox.rs [deleted file]
crates/apub_receive/src/inbox/mod.rs [deleted file]
crates/apub_receive/src/inbox/person_inbox.rs [deleted file]
crates/apub_receive/src/inbox/receive_for_community.rs [deleted file]
crates/apub_receive/src/inbox/shared_inbox.rs [deleted file]
crates/apub_receive/src/lib.rs
docker/federation/start-local-instances.bash
scripts/compilation_benchmark.sh
src/main.rs