lemmy/crates/apub/src/api/mod.rs
Nutomic 6f513793cb
Activitypub crate rewrite (#2782)
* update activitypub-federation crate to 0.4.0

* fixes

* apub compiles!

* everything compiling!

* almost done, federated follow failing

* some test fixes

* use release

* add code back in
2023-03-21 16:03:05 +01:00

21 lines
495 B
Rust

use activitypub_federation::config::Data;
use lemmy_api_common::context::LemmyContext;
use lemmy_utils::{error::LemmyError, ConnectionId};
mod list_comments;
mod list_posts;
mod read_community;
mod read_person;
mod resolve_object;
mod search;
#[async_trait::async_trait]
pub trait PerformApub {
type Response: serde::ser::Serialize + Send;
async fn perform(
&self,
context: &Data<LemmyContext>,
websocket_id: Option<ConnectionId>,
) -> Result<Self::Response, LemmyError>;
}