Move actions to apub
This commit is contained in:
parent
5d56504507
commit
397f67ade6
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{CreateBlock, DeleteBlock},
|
||||
apub::actions::{CreateBlock, DeleteBlock},
|
||||
recover, Action, Context, Error, RecoverableError, Required,
|
||||
};
|
||||
use activitystreams::prelude::*;
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{
|
||||
apub::actions::{
|
||||
AcceptFollowRequest, CreateFollowRequest, DeleteFollow, DeleteFollowRequest,
|
||||
RejectFollowRequest,
|
||||
},
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{CreateReact, DeleteReact},
|
||||
apub::actions::{CreateReact, DeleteReact},
|
||||
recover, Action, Context, Error, RecoverableError, Required,
|
||||
};
|
||||
use activitystreams::prelude::*;
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{
|
||||
apub::actions::{
|
||||
AnnounceComment, AnnounceSubmission, CreateComment, CreateSubmission, DeleteComment,
|
||||
DeleteSubmission, UpdateComment, UpdateSubmission,
|
||||
},
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{CreateProfile, DeleteProfile, UpdateProfile},
|
||||
apub::actions::{CreateProfile, DeleteProfile, UpdateProfile},
|
||||
apub::ExtendedPerson,
|
||||
recover,
|
||||
store::OwnerSource,
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{CreateBlock, DeleteBlock, DeleteFollow, RejectFollowRequest},
|
||||
apub::actions::{CreateBlock, DeleteBlock, DeleteFollow, RejectFollowRequest},
|
||||
Action, Context, Error,
|
||||
};
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{AnnounceComment, CreateComment, DeleteComment, DeleteReact, UpdateComment},
|
||||
apub::actions::{AnnounceComment, CreateComment, DeleteComment, DeleteReact, UpdateComment},
|
||||
Action, Context, Error, Required,
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{actions::DeleteFollow, Action, Context, Error};
|
||||
use crate::{apub::actions::DeleteFollow, Action, Context, Error};
|
||||
|
||||
impl Action for DeleteFollow {
|
||||
fn perform(&self, context: &Context) -> Result<(), Error> {
|
|
@ -1,5 +1,7 @@
|
|||
use crate::{
|
||||
actions::{AcceptFollowRequest, CreateFollowRequest, DeleteFollowRequest, RejectFollowRequest},
|
||||
apub::actions::{
|
||||
AcceptFollowRequest, CreateFollowRequest, DeleteFollowRequest, RejectFollowRequest,
|
||||
},
|
||||
Action, Context, Error,
|
||||
};
|
||||
|
|
@ -12,7 +12,7 @@ mod profile;
|
|||
mod react;
|
||||
mod submission;
|
||||
|
||||
pub(super) use apub::ingest;
|
||||
pub(crate) use apub::ingest;
|
||||
|
||||
pub struct CreateReact {
|
||||
apub_id: Url,
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{CreateProfile, DeleteProfile, DeleteSubmission, UpdateProfile},
|
||||
apub::actions::{CreateProfile, DeleteProfile, DeleteSubmission, UpdateProfile},
|
||||
Action, Context, Error, Required,
|
||||
};
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{CreateReact, DeleteReact},
|
||||
apub::actions::{CreateReact, DeleteReact},
|
||||
Action, Context, Error, Required,
|
||||
};
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
actions::{
|
||||
apub::actions::{
|
||||
AnnounceSubmission, CreateSubmission, DeleteComment, DeleteSubmission, UpdateSubmission,
|
||||
},
|
||||
Action, Context, Error, Required,
|
|
@ -4,9 +4,11 @@ use std::{fmt, sync::Arc};
|
|||
use url::Url;
|
||||
use uuid::Uuid;
|
||||
|
||||
mod actions;
|
||||
mod keys;
|
||||
|
||||
pub use keys::{ExtendedPerson, PublicKey, PublicKeyInner};
|
||||
pub(crate) use actions::ingest;
|
||||
use keys::ExtendedPerson;
|
||||
|
||||
pub trait ApubIds {
|
||||
fn gen_id(&self) -> Url;
|
||||
|
|
|
@ -16,7 +16,6 @@ macro_rules! recover {
|
|||
};
|
||||
}
|
||||
|
||||
mod actions;
|
||||
pub mod apub;
|
||||
pub mod pictrs;
|
||||
pub mod store;
|
||||
|
@ -118,7 +117,7 @@ impl State {
|
|||
pub async fn ingest(&self, any_base: AnyBase, stack: Vec<AnyBase>) -> Result<(), Error> {
|
||||
let context = Context::from_state(self).await;
|
||||
|
||||
actions::ingest(any_base, &context, stack)?;
|
||||
apub::ingest(any_base, &context, stack)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue