Federate article updating
This commit is contained in:
+6
-1
@@ -1,4 +1,4 @@
|
||||
use activitypub::{activity::{Announce, Create, Delete, Like, Undo}, object::Tombstone};
|
||||
use activitypub::{activity::{Announce, Create, Delete, Like, Undo, Update}, object::Tombstone};
|
||||
use diesel::PgConnection;
|
||||
use failure::Error;
|
||||
use serde_json;
|
||||
@@ -63,6 +63,11 @@ pub trait Inbox {
|
||||
_ => Err(InboxError::CantUndo)?
|
||||
}
|
||||
}
|
||||
"Update" => {
|
||||
let act: Update = serde_json::from_value(act.clone())?;
|
||||
Post::handle_update(conn, act.update_props.object_object()?);
|
||||
Ok(())
|
||||
}
|
||||
_ => Err(InboxError::InvalidType)?
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user