]> Untitled Git - lemmy.git/commitdiff
Fix user following (#2623)
authorNutomic <me@nutomic.com>
Mon, 19 Dec 2022 15:55:26 +0000 (15:55 +0000)
committerGitHub <noreply@github.com>
Mon, 19 Dec 2022 15:55:26 +0000 (10:55 -0500)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
crates/apub/src/activity_lists.rs
scripts/test.sh

index 6e1771127a00765ba652835ec7b24a25021ebd99..037717d844b4465f053f5e393dcb80f7ade96d52 100644 (file)
@@ -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::<PersonInboxActivitiesWithAnnouncable>("assets/mastodon/activities/follow.json")
+      .unwrap();
   }
 
   #[test]
index 5a6130a452ed9b7d12e6564bdb538255f4a27de8..312dbd5a38315a5d27860cbbc4cfb618a9072dcd 100755 (executable)
@@ -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