From a0dc2363f6de94fd835a2bd24a4e0aeee996c87c Mon Sep 17 00:00:00 2001 From: asonix Date: Tue, 13 Dec 2022 10:35:16 -0600 Subject: [PATCH] Add support for Add activity - forward verbatim --- src/apub.rs | 1 + src/routes/inbox.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/apub.rs b/src/apub.rs index 2b922e3..48f64d4 100644 --- a/src/apub.rs +++ b/src/apub.rs @@ -33,6 +33,7 @@ pub struct PublicKey { #[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd, serde::Deserialize, serde::Serialize)] #[serde(rename_all = "PascalCase")] pub enum ValidTypes { + Add, Accept, Announce, Create, diff --git a/src/routes/inbox.rs b/src/routes/inbox.rs index 472b97d..38d492a 100644 --- a/src/routes/inbox.rs +++ b/src/routes/inbox.rs @@ -71,7 +71,9 @@ pub(crate) async fn route( handle_announce(&state, &jobs, input, actor).await? } ValidTypes::Follow => handle_follow(&config, &jobs, input, actor).await?, - ValidTypes::Delete | ValidTypes::Update => handle_forward(&jobs, input, actor).await?, + ValidTypes::Add | ValidTypes::Delete | ValidTypes::Update => { + handle_forward(&jobs, input, actor).await? + } ValidTypes::Undo => handle_undo(&config, &jobs, input, actor, is_connected).await?, };