]> Untitled Git - lemmy.git/commitdiff
Rewrite community outbox to use new fetcher
authorFelix Ableitner <me@nutomic.com>
Mon, 25 Oct 2021 14:15:03 +0000 (16:15 +0200)
committerFelix Ableitner <me@nutomic.com>
Fri, 29 Oct 2021 10:45:53 +0000 (12:45 +0200)
crates/apub/src/collections/community_outbox.rs
crates/apub/src/collections/mod.rs
crates/apub/src/http/community.rs
crates/apub/src/objects/community.rs

index 24465c95c2532482ea43b0c1cf53791152c24de3..4b5e7618a4ba06d4c2c903990fe876edbdb3fca6 100644 (file)
@@ -9,6 +9,7 @@ use activitystreams::{
   base::AnyBase,
   chrono::NaiveDateTime,
   collection::kind::OrderedCollectionType,
+  object::Tombstone,
   primitives::OneOrMany,
   url::Url,
 };
@@ -43,7 +44,7 @@ pub(crate) struct ApubCommunityOutbox(Vec<ApubPost>);
 #[async_trait::async_trait(?Send)]
 impl ApubObject for ApubCommunityOutbox {
   type DataType = CommunityContext;
-  type TombstoneType = ();
+  type TombstoneType = Tombstone;
   type ApubType = GroupOutbox;
 
   fn last_refreshed_at(&self) -> Option<NaiveDateTime> {
index 948824e2292f149b30673f70a69e2eda5bb34ded..e2a274a01ee24328d69adf14b6231b54ac09e6a0 100644 (file)
@@ -1,5 +1,6 @@
 use crate::objects::community::ApubCommunity;
 use lemmy_websocket::LemmyContext;
+
 pub(crate) mod community_moderators;
 pub(crate) mod community_outbox;
 
index 6a1c02d7e1013adb6c88189d84d7eda5401bc973..dcaf551f16837a65667f2b19761faaefffaa69e7 100644 (file)
@@ -6,14 +6,18 @@ use crate::{
     report::Report,
   },
   collections::{
-    community_moderators::ApubCommunityModerators, community_outbox::ApubCommunityOutbox,
+    community_moderators::ApubCommunityModerators,
+    community_outbox::ApubCommunityOutbox,
     CommunityContext,
   },
   context::lemmy_context,
   fetcher::object_id::ObjectId,
   generate_outbox_url,
   http::{
-    create_apub_response, create_apub_tombstone_response, payload_to_string, receive_activity,
+    create_apub_response,
+    create_apub_tombstone_response,
+    payload_to_string,
+    receive_activity,
   },
   objects::community::ApubCommunity,
 };
index 21ae614fb38883682b6967a0fc912cea53d449f2..e71addba574adce8793119d0b8e20cfe357732f9 100644 (file)
@@ -1,12 +1,14 @@
 use crate::{
   check_is_apub_id_valid,
   collections::{
-    community_moderators::ApubCommunityModerators, community_outbox::ApubCommunityOutbox,
+    community_moderators::ApubCommunityModerators,
+    community_outbox::ApubCommunityOutbox,
     CommunityContext,
   },
   context::lemmy_context,
   fetcher::object_id::ObjectId,
-  generate_moderators_url, generate_outbox_url,
+  generate_moderators_url,
+  generate_outbox_url,
   objects::{get_summary_from_string_or_source, tombstone::Tombstone, ImageObject, Source},
   CommunityType,
 };