Post activities to the correct inbox

Don't assume everyone is following Plume's routing
This commit is contained in:
Bat
2018-05-05 14:46:06 +01:00
parent b36e83049c
commit d3c3180038
3 changed files with 13 additions and 3 deletions
+4
View File
@@ -126,6 +126,10 @@ impl Actor for Blog {
ActorType::Blog
}
fn get_inbox_url(&self) -> String {
self.inbox_url.clone()
}
fn from_url(conn: &PgConnection, url: String) -> Option<Blog> {
blogs::table.filter(blogs::ap_url.eq(url))
.limit(1)
+4
View File
@@ -263,6 +263,10 @@ impl Actor for User {
ActorType::Person
}
fn get_inbox_url(&self) -> String {
self.inbox_url.clone()
}
fn custom_props(&self, conn: &PgConnection) -> serde_json::Map<String, serde_json::Value> {
let mut res = serde_json::Map::new();
res.insert("publicKey".to_string(), json!({