From 171d17e00d9c7b64e433b7300ad13ef739c5a979 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 22 Sep 2021 16:17:14 +0200 Subject: [PATCH] rename new_fetcher to dereference_object_id --- crates/apub/src/activities/comment/mod.rs | 2 +- crates/apub/src/activities/community/add_mod.rs | 2 +- crates/apub/src/activities/community/block_user.rs | 2 +- crates/apub/src/activities/community/remove_mod.rs | 2 +- crates/apub/src/activities/community/undo_block_user.rs | 2 +- crates/apub/src/activities/deletion/delete.rs | 2 +- crates/apub/src/activities/deletion/mod.rs | 2 +- crates/apub/src/activities/following/accept.rs | 2 +- crates/apub/src/activities/following/follow.rs | 2 +- crates/apub/src/activities/following/undo.rs | 2 +- crates/apub/src/activities/mod.rs | 2 +- crates/apub/src/activities/post/create_or_update.rs | 2 +- crates/apub/src/activities/voting/undo_vote.rs | 2 +- crates/apub/src/activities/voting/vote.rs | 2 +- crates/apub/src/fetcher/community.rs | 2 +- .../src/fetcher/{new_fetcher.rs => dereference_object_id.rs} | 0 crates/apub/src/fetcher/mod.rs | 4 ++-- crates/apub/src/fetcher/search.rs | 2 +- crates/apub/src/objects/comment.rs | 2 +- crates/apub/src/objects/post.rs | 2 +- crates/apub/src/objects/private_message.rs | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) rename crates/apub/src/fetcher/{new_fetcher.rs => dereference_object_id.rs} (100%) diff --git a/crates/apub/src/activities/comment/mod.rs b/crates/apub/src/activities/comment/mod.rs index 44a6ea405..daeb82268 100644 --- a/crates/apub/src/activities/comment/mod.rs +++ b/crates/apub/src/activities/comment/mod.rs @@ -1,4 +1,4 @@ -use crate::{fetcher::new_fetcher::dereference, ActorType}; +use crate::{fetcher::dereference_object_id::dereference, ActorType}; use activitystreams::{ base::BaseExt, link::{LinkExt, Mention}, diff --git a/crates/apub/src/activities/community/add_mod.rs b/crates/apub/src/activities/community/add_mod.rs index 135dae4df..623b274fb 100644 --- a/crates/apub/src/activities/community/add_mod.rs +++ b/crates/apub/src/activities/community/add_mod.rs @@ -9,7 +9,7 @@ use crate::{ }, activity_queue::send_to_community_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, generate_moderators_url, ActorType, }; diff --git a/crates/apub/src/activities/community/block_user.rs b/crates/apub/src/activities/community/block_user.rs index f0e4681ab..eab202f9a 100644 --- a/crates/apub/src/activities/community/block_user.rs +++ b/crates/apub/src/activities/community/block_user.rs @@ -8,7 +8,7 @@ use crate::{ }, activity_queue::send_to_community_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, }; use activitystreams::{ diff --git a/crates/apub/src/activities/community/remove_mod.rs b/crates/apub/src/activities/community/remove_mod.rs index 6746a52d9..0311e4a9a 100644 --- a/crates/apub/src/activities/community/remove_mod.rs +++ b/crates/apub/src/activities/community/remove_mod.rs @@ -10,7 +10,7 @@ use crate::{ }, activity_queue::send_to_community_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, generate_moderators_url, ActorType, }; diff --git a/crates/apub/src/activities/community/undo_block_user.rs b/crates/apub/src/activities/community/undo_block_user.rs index 2220a56f2..799a2e096 100644 --- a/crates/apub/src/activities/community/undo_block_user.rs +++ b/crates/apub/src/activities/community/undo_block_user.rs @@ -8,7 +8,7 @@ use crate::{ }, activity_queue::send_to_community_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, }; use activitystreams::{ diff --git a/crates/apub/src/activities/deletion/delete.rs b/crates/apub/src/activities/deletion/delete.rs index 1bd8bc0bf..fad65b475 100644 --- a/crates/apub/src/activities/deletion/delete.rs +++ b/crates/apub/src/activities/deletion/delete.rs @@ -12,7 +12,7 @@ use crate::{ }, activity_queue::send_to_community_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, }; use activitystreams::{ diff --git a/crates/apub/src/activities/deletion/mod.rs b/crates/apub/src/activities/deletion/mod.rs index 41f5f09c6..337b4c794 100644 --- a/crates/apub/src/activities/deletion/mod.rs +++ b/crates/apub/src/activities/deletion/mod.rs @@ -4,7 +4,7 @@ use crate::{ verify_mod_action, verify_person_in_community, }, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, }; use lemmy_api_common::blocking; diff --git a/crates/apub/src/activities/following/accept.rs b/crates/apub/src/activities/following/accept.rs index 6c8412dcd..aa0474cd3 100644 --- a/crates/apub/src/activities/following/accept.rs +++ b/crates/apub/src/activities/following/accept.rs @@ -7,7 +7,7 @@ use crate::{ }, activity_queue::send_activity_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, }; use activitystreams::{ diff --git a/crates/apub/src/activities/following/follow.rs b/crates/apub/src/activities/following/follow.rs index 17943a062..f42619092 100644 --- a/crates/apub/src/activities/following/follow.rs +++ b/crates/apub/src/activities/following/follow.rs @@ -7,7 +7,7 @@ use crate::{ }, activity_queue::send_activity_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, }; use activitystreams::{ diff --git a/crates/apub/src/activities/following/undo.rs b/crates/apub/src/activities/following/undo.rs index d09eae04a..28ffeb96b 100644 --- a/crates/apub/src/activities/following/undo.rs +++ b/crates/apub/src/activities/following/undo.rs @@ -7,7 +7,7 @@ use crate::{ }, activity_queue::send_activity_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, }; use activitystreams::{ diff --git a/crates/apub/src/activities/mod.rs b/crates/apub/src/activities/mod.rs index 52ae90ccb..99f92a075 100644 --- a/crates/apub/src/activities/mod.rs +++ b/crates/apub/src/activities/mod.rs @@ -1,7 +1,7 @@ use crate::{ check_community_or_site_ban, check_is_apub_id_valid, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, generate_moderators_url, }; use anyhow::anyhow; diff --git a/crates/apub/src/activities/post/create_or_update.rs b/crates/apub/src/activities/post/create_or_update.rs index d515e2e1e..2b64e71aa 100644 --- a/crates/apub/src/activities/post/create_or_update.rs +++ b/crates/apub/src/activities/post/create_or_update.rs @@ -10,7 +10,7 @@ use crate::{ }, activity_queue::send_to_community_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, objects::{post::Page, FromApub, ToApub}, ActorType, }; diff --git a/crates/apub/src/activities/voting/undo_vote.rs b/crates/apub/src/activities/voting/undo_vote.rs index 62bf60268..c8ba5e440 100644 --- a/crates/apub/src/activities/voting/undo_vote.rs +++ b/crates/apub/src/activities/voting/undo_vote.rs @@ -12,7 +12,7 @@ use crate::{ }, activity_queue::send_to_community_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, PostOrComment, }; diff --git a/crates/apub/src/activities/voting/vote.rs b/crates/apub/src/activities/voting/vote.rs index c1c7fdc39..672358f22 100644 --- a/crates/apub/src/activities/voting/vote.rs +++ b/crates/apub/src/activities/voting/vote.rs @@ -8,7 +8,7 @@ use crate::{ }, activity_queue::send_to_community_new, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, ActorType, PostOrComment, }; diff --git a/crates/apub/src/fetcher/community.rs b/crates/apub/src/fetcher/community.rs index 949e457cd..ffa77296b 100644 --- a/crates/apub/src/fetcher/community.rs +++ b/crates/apub/src/fetcher/community.rs @@ -1,6 +1,6 @@ use crate::{ activities::community::announce::AnnounceActivity, - fetcher::{fetch::fetch_remote_object, new_fetcher::dereference}, + fetcher::{dereference_object_id::dereference, fetch::fetch_remote_object}, objects::community::Group, }; use activitystreams::collection::{CollectionExt, OrderedCollection}; diff --git a/crates/apub/src/fetcher/new_fetcher.rs b/crates/apub/src/fetcher/dereference_object_id.rs similarity index 100% rename from crates/apub/src/fetcher/new_fetcher.rs rename to crates/apub/src/fetcher/dereference_object_id.rs diff --git a/crates/apub/src/fetcher/mod.rs b/crates/apub/src/fetcher/mod.rs index e8b1caa11..71ecb8554 100644 --- a/crates/apub/src/fetcher/mod.rs +++ b/crates/apub/src/fetcher/mod.rs @@ -1,11 +1,11 @@ pub mod community; +pub mod dereference_object_id; mod fetch; -pub mod new_fetcher; pub mod post_or_comment; pub mod search; use crate::{ - fetcher::{fetch::FetchError, new_fetcher::dereference}, + fetcher::{dereference_object_id::dereference, fetch::FetchError}, ActorType, }; use chrono::NaiveDateTime; diff --git a/crates/apub/src/fetcher/search.rs b/crates/apub/src/fetcher/search.rs index f0c86bb06..bfeb8abe7 100644 --- a/crates/apub/src/fetcher/search.rs +++ b/crates/apub/src/fetcher/search.rs @@ -1,5 +1,5 @@ use crate::{ - fetcher::{fetch::fetch_remote_object, is_deleted, new_fetcher::dereference}, + fetcher::{dereference_object_id::dereference, fetch::fetch_remote_object, is_deleted}, find_object_by_id, objects::{comment::Note, community::Group, person::Person as ApubPerson, post::Page, FromApub}, Object, diff --git a/crates/apub/src/objects/comment.rs b/crates/apub/src/objects/comment.rs index 93abdf896..00a75d6ca 100644 --- a/crates/apub/src/objects/comment.rs +++ b/crates/apub/src/objects/comment.rs @@ -1,7 +1,7 @@ use crate::{ activities::verify_person_in_community, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, migrations::CommentInReplyToMigration, objects::{create_tombstone, FromApub, Source, ToApub}, ActorType, diff --git a/crates/apub/src/objects/post.rs b/crates/apub/src/objects/post.rs index f86dee293..3581d2ccb 100644 --- a/crates/apub/src/objects/post.rs +++ b/crates/apub/src/objects/post.rs @@ -1,7 +1,7 @@ use crate::{ activities::{extract_community, verify_person_in_community}, extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, objects::{create_tombstone, FromApub, ImageObject, Source, ToApub}, ActorType, }; diff --git a/crates/apub/src/objects/private_message.rs b/crates/apub/src/objects/private_message.rs index 92fc0370d..6c91dc6cd 100644 --- a/crates/apub/src/objects/private_message.rs +++ b/crates/apub/src/objects/private_message.rs @@ -1,6 +1,6 @@ use crate::{ extensions::context::lemmy_context, - fetcher::new_fetcher::dereference, + fetcher::dereference_object_id::dereference, objects::{create_tombstone, FromApub, Source, ToApub}, }; use activitystreams::{