From 9f52d4ae538f989d159bf241e9ce185e086b2ed5 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Mon, 19 Dec 2022 15:55:26 +0000 Subject: [PATCH] Fix user following (#2623) Co-authored-by: Dessalines --- crates/apub/src/activity_lists.rs | 5 ++++- scripts/test.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/apub/src/activity_lists.rs b/crates/apub/src/activity_lists.rs index 6e177112..037717d8 100644 --- a/crates/apub/src/activity_lists.rs +++ b/crates/apub/src/activity_lists.rs @@ -52,6 +52,7 @@ pub enum GroupInboxActivities { #[serde(untagged)] #[enum_delegate::implement(ActivityHandler)] pub enum PersonInboxActivities { + Follow(Follow), AcceptFollow(AcceptFollow), UndoFollow(UndoFollow), CreateOrUpdatePrivateMessage(CreateOrUpdateChatMessage), @@ -135,7 +136,7 @@ mod tests { PersonInboxActivitiesWithAnnouncable, SiteInboxActivities, }, - protocol::tests::test_parse_lemmy_item, + protocol::tests::{test_json, test_parse_lemmy_item}, }; #[test] @@ -160,6 +161,8 @@ mod tests { "assets/lemmy/activities/create_or_update/create_private_message.json", ) .unwrap(); + test_json::("assets/mastodon/activities/follow.json") + .unwrap(); } #[test] diff --git a/scripts/test.sh b/scripts/test.sh index 5a6130a4..312dbd5a 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -9,5 +9,5 @@ export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy # so to load the config we need to traverse to the repo root export LEMMY_CONFIG_LOCATION=../../config/config.hjson RUST_BACKTRACE=1 \ - cargo test --workspace --all-features --no-fail-fast + cargo test -p lemmy_apub --all-features --no-fail-fast # Add this to do printlns: -- --nocapture -- 2.44.1