]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/protocol/activities/mod.rs
Use audience field to federate items in groups (fixes #2464) (#2584)
[lemmy.git] / crates / apub / src / protocol / activities / mod.rs
index fcd3153c318410dcb779bd2e91d0d7775402d299..670c4466f4125e8681ec034f63e521c5dc44ca01 100644 (file)
@@ -19,7 +19,7 @@ mod tests {
   use crate::protocol::{
     activities::{
       community::announce::AnnounceActivity,
-      create_or_update::{comment::CreateOrUpdateComment, post::CreateOrUpdatePost},
+      create_or_update::{note::CreateOrUpdateNote, page::CreateOrUpdatePage},
       deletion::delete::Delete,
       following::{follow::Follow, undo_follow::UndoFollow},
       voting::{undo_vote::UndoVote, vote::Vote},
@@ -29,19 +29,19 @@ mod tests {
 
   #[test]
   fn test_parse_smithereen_activities() {
-    test_json::<CreateOrUpdateComment>("assets/smithereen/activities/create_note.json").unwrap();
+    test_json::<CreateOrUpdateNote>("assets/smithereen/activities/create_note.json").unwrap();
   }
 
   #[test]
   fn test_parse_pleroma_activities() {
-    test_json::<CreateOrUpdateComment>("assets/pleroma/activities/create_note.json").unwrap();
+    test_json::<CreateOrUpdateNote>("assets/pleroma/activities/create_note.json").unwrap();
     test_json::<Delete>("assets/pleroma/activities/delete.json").unwrap();
     test_json::<Follow>("assets/pleroma/activities/follow.json").unwrap();
   }
 
   #[test]
   fn test_parse_mastodon_activities() {
-    test_json::<CreateOrUpdateComment>("assets/mastodon/activities/create_note.json").unwrap();
+    test_json::<CreateOrUpdateNote>("assets/mastodon/activities/create_note.json").unwrap();
     test_json::<Delete>("assets/mastodon/activities/delete.json").unwrap();
     test_json::<Follow>("assets/mastodon/activities/follow.json").unwrap();
     test_json::<UndoFollow>("assets/mastodon/activities/undo_follow.json").unwrap();
@@ -51,17 +51,17 @@ mod tests {
 
   #[test]
   fn test_parse_lotide_activities() {
-    test_json::<CreateOrUpdatePost>("assets/lotide/activities/create_page.json").unwrap();
-    test_json::<CreateOrUpdatePost>("assets/lotide/activities/create_page_image.json").unwrap();
-    test_json::<CreateOrUpdateComment>("assets/lotide/activities/create_note_reply.json").unwrap();
+    test_json::<CreateOrUpdatePage>("assets/lotide/activities/create_page.json").unwrap();
+    test_json::<CreateOrUpdatePage>("assets/lotide/activities/create_page_image.json").unwrap();
+    test_json::<CreateOrUpdateNote>("assets/lotide/activities/create_note_reply.json").unwrap();
   }
 
   #[test]
   fn test_parse_friendica_activities() {
-    test_json::<CreateOrUpdatePost>("assets/friendica/activities/create_page_1.json").unwrap();
-    test_json::<CreateOrUpdatePost>("assets/friendica/activities/create_page_2.json").unwrap();
-    test_json::<CreateOrUpdateComment>("assets/friendica/activities/create_note.json").unwrap();
-    test_json::<CreateOrUpdateComment>("assets/friendica/activities/update_note.json").unwrap();
+    test_json::<CreateOrUpdatePage>("assets/friendica/activities/create_page_1.json").unwrap();
+    test_json::<CreateOrUpdatePage>("assets/friendica/activities/create_page_2.json").unwrap();
+    test_json::<CreateOrUpdateNote>("assets/friendica/activities/create_note.json").unwrap();
+    test_json::<CreateOrUpdateNote>("assets/friendica/activities/update_note.json").unwrap();
     test_json::<Delete>("assets/friendica/activities/delete.json").unwrap();
     test_json::<Vote>("assets/friendica/activities/like_page.json").unwrap();
     test_json::<Vote>("assets/friendica/activities/dislike_page.json").unwrap();
@@ -70,8 +70,8 @@ mod tests {
 
   #[test]
   fn test_parse_gnusocial_activities() {
-    test_json::<CreateOrUpdatePost>("assets/gnusocial/activities/create_page.json").unwrap();
-    test_json::<CreateOrUpdateComment>("assets/gnusocial/activities/create_note.json").unwrap();
+    test_json::<CreateOrUpdatePage>("assets/gnusocial/activities/create_page.json").unwrap();
+    test_json::<CreateOrUpdateNote>("assets/gnusocial/activities/create_note.json").unwrap();
     test_json::<Vote>("assets/gnusocial/activities/like_note.json").unwrap();
   }