7 use activitystreams::actor::{properties::ApActorProperties, Group};
8 use activitystreams::ext::Ext;
9 use actix_web::body::Body;
10 use actix_web::HttpResponse;
13 type GroupExt = Ext<Group, ApActorProperties>;
15 fn create_apub_response<T>(json: &T) -> HttpResponse<Body>
17 T: serde::ser::Serialize,
20 .content_type("application/activity+json")
30 fn make_apub_endpoint(endpoint_type: EndpointType, name: &str) -> Url {
31 let point = match endpoint_type {
32 EndpointType::Community => "c",
33 EndpointType::User => "u",
34 EndpointType::Post => "p",
38 "{}://{}/federation/{}/{}",
39 get_apub_protocol_string(),
40 Settings::get().hostname,
47 pub fn get_apub_protocol_string() -> &'static str {
48 if Settings::get().federation.tls_enabled {