Shared inbox endpoint
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
use chrono::NaiveDateTime;
|
||||
use diesel::{self, QueryDsl, RunQueryDsl, ExpressionMethods, PgConnection};
|
||||
use serde_json;
|
||||
use std::iter::Iterator;
|
||||
|
||||
use activity_pub::inbox::Inbox;
|
||||
use models::users::User;
|
||||
use schema::{instances, users};
|
||||
|
||||
@@ -81,3 +83,11 @@ impl Instance {
|
||||
.len() > 0
|
||||
}
|
||||
}
|
||||
|
||||
impl Inbox for Instance {
|
||||
fn received(&self, conn: &PgConnection, act: serde_json::Value) {
|
||||
self.save(conn, act.clone());
|
||||
|
||||
// TODO: add to stream, or whatever needs to be done
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user