Ran cargo fmt.

This commit is contained in:
Dessalines 2020-07-19 12:26:23 -04:00
parent f0a223f337
commit b03a2d7995
11 changed files with 91 additions and 32 deletions

View File

@ -1,10 +1,14 @@
use crate::{ use crate::{
apub::{ apub::{
community::do_announce, extensions::signatures::sign, insert_activity, is_apub_id_valid, community::do_announce,
extensions::signatures::sign,
insert_activity,
is_apub_id_valid,
ActorType, ActorType,
}, },
request::retry_custom, request::retry_custom,
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_new::base::AnyBase; use activitystreams_new::base::AnyBase;
use actix_web::client::Client; use actix_web::client::Client;

View File

@ -1,16 +1,25 @@
use crate::{ use crate::{
apub::{ apub::{
activities::send_activity_to_community, activities::send_activity_to_community,
create_apub_response, create_apub_tombstone_response, create_tombstone, fetch_webfinger_url, create_apub_response,
create_apub_tombstone_response,
create_tombstone,
fetch_webfinger_url,
fetcher::{ fetcher::{
get_or_fetch_and_insert_remote_comment, get_or_fetch_and_insert_remote_post, get_or_fetch_and_insert_remote_comment,
get_or_fetch_and_insert_remote_post,
get_or_fetch_and_upsert_remote_user, get_or_fetch_and_upsert_remote_user,
}, },
ActorType, ApubLikeableType, ApubObjectType, FromApub, ToApub, ActorType,
ApubLikeableType,
ApubObjectType,
FromApub,
ToApub,
}, },
blocking, blocking,
routes::DbPoolParam, routes::DbPoolParam,
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_new::{ use activitystreams_new::{
activity::{Create, Delete, Dislike, Like, Remove, Undo, Update}, activity::{Create, Delete, Dislike, Like, Remove, Undo, Update},

View File

@ -1,13 +1,22 @@
use crate::{ use crate::{
apub::{ apub::{
activities::send_activity, create_apub_response, create_apub_tombstone_response, activities::send_activity,
create_tombstone, extensions::group_extensions::GroupExtension, create_apub_response,
fetcher::get_or_fetch_and_upsert_remote_user, get_shared_inbox, insert_activity, ActorType, create_apub_tombstone_response,
FromApub, GroupExt, ToApub, create_tombstone,
extensions::group_extensions::GroupExtension,
fetcher::get_or_fetch_and_upsert_remote_user,
get_shared_inbox,
insert_activity,
ActorType,
FromApub,
GroupExt,
ToApub,
}, },
blocking, blocking,
routes::DbPoolParam, routes::DbPoolParam,
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_ext::Ext2; use activitystreams_ext::Ext2;
use activitystreams_new::{ use activitystreams_new::{

View File

@ -2,7 +2,8 @@ use crate::{
apub::{ apub::{
extensions::signatures::verify, extensions::signatures::verify,
fetcher::{get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user}, fetcher::{get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user},
insert_activity, ActorType, insert_activity,
ActorType,
}, },
blocking, blocking,
routes::{ChatServerParam, DbPoolParam}, routes::{ChatServerParam, DbPoolParam},

View File

@ -4,7 +4,8 @@ use crate::{
blocking, blocking,
request::{retry, RecvError}, request::{retry, RecvError},
routes::nodeinfo::{NodeInfo, NodeInfoWellKnown}, routes::nodeinfo::{NodeInfo, NodeInfoWellKnown},
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_new::{base::BaseExt, object::Note, prelude::*}; use activitystreams_new::{base::BaseExt, object::Note, prelude::*};
use actix_web::client::Client; use actix_web::client::Client;
@ -20,7 +21,9 @@ use lemmy_db::{
post_view::PostView, post_view::PostView,
user::{UserForm, User_}, user::{UserForm, User_},
user_view::UserView, user_view::UserView,
Crud, Joinable, SearchType, Crud,
Joinable,
SearchType,
}; };
use lemmy_utils::get_apub_protocol_string; use lemmy_utils::get_apub_protocol_string;
use log::debug; use log::debug;

View File

@ -19,7 +19,8 @@ use crate::{
blocking, blocking,
request::{retry, RecvError}, request::{retry, RecvError},
routes::webfinger::WebFingerResponse, routes::webfinger::WebFingerResponse,
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_ext::{Ext1, Ext2}; use activitystreams_ext::{Ext1, Ext2};
use activitystreams_new::{ use activitystreams_new::{

View File

@ -1,14 +1,22 @@
use crate::{ use crate::{
apub::{ apub::{
activities::send_activity_to_community, activities::send_activity_to_community,
create_apub_response, create_apub_tombstone_response, create_tombstone, create_apub_response,
create_apub_tombstone_response,
create_tombstone,
extensions::page_extension::PageExtension, extensions::page_extension::PageExtension,
fetcher::{get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user}, fetcher::{get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user},
ActorType, ApubLikeableType, ApubObjectType, FromApub, PageExt, ToApub, ActorType,
ApubLikeableType,
ApubObjectType,
FromApub,
PageExt,
ToApub,
}, },
blocking, blocking,
routes::DbPoolParam, routes::DbPoolParam,
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_ext::Ext1; use activitystreams_ext::Ext1;
use activitystreams_new::{ use activitystreams_new::{

View File

@ -1,9 +1,16 @@
use crate::{ use crate::{
apub::{ apub::{
activities::send_activity, create_tombstone, fetcher::get_or_fetch_and_upsert_remote_user, activities::send_activity,
insert_activity, ApubObjectType, FromApub, ToApub, create_tombstone,
fetcher::get_or_fetch_and_upsert_remote_user,
insert_activity,
ApubObjectType,
FromApub,
ToApub,
}, },
blocking, DbPool, LemmyError, blocking,
DbPool,
LemmyError,
}; };
use activitystreams_new::{ use activitystreams_new::{
activity::{Create, Delete, Undo, Update}, activity::{Create, Delete, Undo, Update},

View File

@ -8,10 +8,16 @@ use crate::{
community::do_announce, community::do_announce,
extensions::signatures::verify, extensions::signatures::verify,
fetcher::{ fetcher::{
get_or_fetch_and_insert_remote_comment, get_or_fetch_and_insert_remote_post, get_or_fetch_and_insert_remote_comment,
get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user, get_or_fetch_and_insert_remote_post,
get_or_fetch_and_upsert_remote_community,
get_or_fetch_and_upsert_remote_user,
}, },
insert_activity, ActorType, FromApub, GroupExt, PageExt, insert_activity,
ActorType,
FromApub,
GroupExt,
PageExt,
}, },
blocking, blocking,
routes::{ChatServerParam, DbPoolParam}, routes::{ChatServerParam, DbPoolParam},
@ -19,7 +25,8 @@ use crate::{
server::{SendComment, SendCommunityRoomMessage, SendPost}, server::{SendComment, SendCommunityRoomMessage, SendPost},
UserOperation, UserOperation,
}, },
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_new::{ use activitystreams_new::{
activity::{ActorAndObjectRef, Announce, Create, Delete, Dislike, Like, Remove, Undo, Update}, activity::{ActorAndObjectRef, Announce, Create, Delete, Dislike, Like, Remove, Undo, Update},
@ -38,7 +45,8 @@ use lemmy_db::{
post::{Post, PostForm, PostLike, PostLikeForm}, post::{Post, PostForm, PostLike, PostLikeForm},
post_view::PostView, post_view::PostView,
user::User_, user::User_,
Crud, Likeable, Crud,
Likeable,
}; };
use lemmy_utils::scrape_text_for_mentions; use lemmy_utils::scrape_text_for_mentions;
use log::debug; use log::debug;

View File

@ -1,12 +1,18 @@
use crate::{ use crate::{
api::claims::Claims, api::claims::Claims,
apub::{ apub::{
activities::send_activity, create_apub_response, insert_activity, ActorType, FromApub, activities::send_activity,
PersonExt, ToApub, create_apub_response,
insert_activity,
ActorType,
FromApub,
PersonExt,
ToApub,
}, },
blocking, blocking,
routes::DbPoolParam, routes::DbPoolParam,
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_ext::Ext1; use activitystreams_ext::Ext1;
use activitystreams_new::{ use activitystreams_new::{

View File

@ -3,12 +3,14 @@ use crate::{
apub::{ apub::{
extensions::signatures::verify, extensions::signatures::verify,
fetcher::{get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user}, fetcher::{get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user},
insert_activity, FromApub, insert_activity,
FromApub,
}, },
blocking, blocking,
routes::{ChatServerParam, DbPoolParam}, routes::{ChatServerParam, DbPoolParam},
websocket::{server::SendUserRoomMessage, UserOperation}, websocket::{server::SendUserRoomMessage, UserOperation},
DbPool, LemmyError, DbPool,
LemmyError,
}; };
use activitystreams_new::{ use activitystreams_new::{
activity::{Accept, Create, Delete, Undo, Update}, activity::{Accept, Create, Delete, Undo, Update},
@ -22,7 +24,8 @@ use lemmy_db::{
private_message::{PrivateMessage, PrivateMessageForm}, private_message::{PrivateMessage, PrivateMessageForm},
private_message_view::PrivateMessageView, private_message_view::PrivateMessageView,
user::User_, user::User_,
Crud, Followable, Crud,
Followable,
}; };
use log::debug; use log::debug;
use serde::Deserialize; use serde::Deserialize;