diff options
Diffstat (limited to 'server/src/apub/fetcher.rs')
-rw-r--r-- | server/src/apub/fetcher.rs | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/server/src/apub/fetcher.rs b/server/src/apub/fetcher.rs index 994e75f2..9379dd96 100644 --- a/server/src/apub/fetcher.rs +++ b/server/src/apub/fetcher.rs @@ -1,4 +1,43 @@ -use super::*; +use activitystreams::object::Note; +use actix_web::Result; +use diesel::{result::Error::NotFound, PgConnection}; +use failure::{Error, _core::fmt::Debug}; +use isahc::prelude::*; +use log::debug; +use serde::Deserialize; +use std::time::Duration; +use url::Url; + +use crate::{ + api::site::SearchResponse, + db::{ + comment::{Comment, CommentForm}, + comment_view::CommentView, + community::{Community, CommunityForm, CommunityModerator, CommunityModeratorForm}, + community_view::CommunityView, + post::{Post, PostForm}, + post_view::PostView, + user::{UserForm, User_}, + Crud, + Joinable, + SearchType, + }, + naive_now, + routes::nodeinfo::{NodeInfo, NodeInfoWellKnown}, +}; + +use crate::{ + apub::{ + get_apub_protocol_string, + is_apub_id_valid, + FromApub, + GroupExt, + PageExt, + PersonExt, + APUB_JSON_CONTENT_TYPE, + }, + db::user_view::UserView, +}; // Fetch nodeinfo metadata from a remote instance. fn _fetch_node_info(domain: &str) -> Result<NodeInfo, Error> { |