Use shared inbox when available
But it is not yet stored in the database, so it means never
This commit is contained in:
+5
-1
@@ -15,7 +15,7 @@ use models::instance::Instance;
|
||||
use schema::blogs;
|
||||
|
||||
|
||||
#[derive(Queryable, Identifiable, Serialize)]
|
||||
#[derive(Queryable, Identifiable, Serialize, Clone)]
|
||||
pub struct Blog {
|
||||
pub id: i32,
|
||||
pub actor_id: String,
|
||||
@@ -130,6 +130,10 @@ impl Actor for Blog {
|
||||
self.inbox_url.clone()
|
||||
}
|
||||
|
||||
fn get_shared_inbox_url(&self) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
fn from_url(conn: &PgConnection, url: String) -> Option<Blog> {
|
||||
blogs::table.filter(blogs::ap_url.eq(url))
|
||||
.limit(1)
|
||||
|
||||
@@ -300,6 +300,10 @@ impl Actor for User {
|
||||
self.inbox_url.clone()
|
||||
}
|
||||
|
||||
fn get_shared_inbox_url(&self) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
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!({
|
||||
|
||||
Reference in New Issue
Block a user