diff --git a/apb/src/server.rs b/apb/src/server.rs index 3089cf1c..e76a53a3 100644 --- a/apb/src/server.rs +++ b/apb/src/server.rs @@ -8,9 +8,12 @@ pub trait Outbox { async fn create(&self, uid: String, activity: Self::Activity) -> Result; async fn like(&self, uid: String, activity: Self::Activity) -> Result; async fn follow(&self, uid: String, activity: Self::Activity) -> Result; + async fn announce(&self, uid: String, activity: Self::Activity) -> Result; async fn accept(&self, uid: String, activity: Self::Activity) -> Result; async fn reject(&self, _uid: String, _activity: Self::Activity) -> Result; async fn undo(&self, uid: String, activity: Self::Activity) -> Result; + async fn delete(&self, uid: String, activity: Self::Activity) -> Result; + async fn update(&self, uid: String, activity: Self::Activity) -> Result; } #[async_trait::async_trait] @@ -18,13 +21,13 @@ pub trait Inbox { type Activity: crate::Activity; type Error: std::error::Error; - async fn create(&self, activity: Self::Activity) -> Result<(), Self::Error>; - async fn like(&self, activity: Self::Activity) -> Result<(), Self::Error>; - async fn follow(&self, activity: Self::Activity) -> Result<(), Self::Error>; - async fn announce(&self, activity: Self::Activity) -> Result<(), Self::Error>; - async fn accept(&self, activity: Self::Activity) -> Result<(), Self::Error>; - async fn reject(&self, activity: Self::Activity) -> Result<(), Self::Error>; - async fn undo(&self, activity: Self::Activity) -> Result<(), Self::Error>; - async fn delete(&self, activity: Self::Activity) -> Result<(), Self::Error>; - async fn update(&self, activity: Self::Activity) -> Result<(), Self::Error>; + async fn create(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; + async fn like(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; + async fn follow(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; + async fn announce(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; + async fn accept(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; + async fn reject(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; + async fn undo(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; + async fn delete(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; + async fn update(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>; }