summaryrefslogtreecommitdiffstats
path: root/server/src/apub/mod.rs
diff options
context:
space:
mode:
authorFelix <me@nutomic.com>2020-04-21 22:45:01 +0200
committerFelix <me@nutomic.com>2020-04-21 22:45:01 +0200
commit957e4a26114033b79c0c2e820a07f39fe8680f2c (patch)
tree4447def61d99db6d0702e49d34a8bc9fedca11b3 /server/src/apub/mod.rs
parent4e80543edbdceebbcf4a06e60ca3fc8e76d74920 (diff)
Change apub IDs to be consistent with html urls
Diffstat (limited to 'server/src/apub/mod.rs')
-rw-r--r--server/src/apub/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/apub/mod.rs b/server/src/apub/mod.rs
index 8d5df8a8..84645897 100644
--- a/server/src/apub/mod.rs
+++ b/server/src/apub/mod.rs
@@ -18,7 +18,7 @@ use url::Url;
type GroupExt = Ext<Ext<Group, ApActorProperties>, PublicKeyExtension>;
type PersonExt = Ext<Ext<Person, ApActorProperties>, PublicKeyExtension>;
-static APUB_JSON_CONTENT_TYPE: &str = "application/activity+json";
+pub static APUB_JSON_CONTENT_TYPE: &str = "application/activity+json";
pub enum EndpointType {
Community,
@@ -47,14 +47,14 @@ pub fn make_apub_endpoint(endpoint_type: EndpointType, name: &str) -> Url {
let point = match endpoint_type {
EndpointType::Community => "c",
EndpointType::User => "u",
- EndpointType::Post => "p",
+ EndpointType::Post => "post",
// TODO I have to change this else my update advanced_migrations crashes the
// server if a comment exists.
EndpointType::Comment => "comment",
};
Url::parse(&format!(
- "{}://{}/federation/{}/{}",
+ "{}://{}/{}/{}",
get_apub_protocol_string(),
Settings::get().hostname,
point,