From 867740b2e66bc11fd1e9252050150a0c4079deb4 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 23 Apr 2024 03:45:50 +0200 Subject: [PATCH] fix: actually hook up all outbox actions --- src/routes/activitypub/user/outbox.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/routes/activitypub/user/outbox.rs b/src/routes/activitypub/user/outbox.rs index 9f60f63c..8d1d4db4 100644 --- a/src/routes/activitypub/user/outbox.rs +++ b/src/routes/activitypub/user/outbox.rs @@ -75,8 +75,8 @@ pub async fn post( Some(BaseType::Object(ObjectType::Activity(ActivityType::Follow))) => Ok(CreationResult(ctx.follow(uid, activity).await?)), - Some(BaseType::Object(ObjectType::Activity(ActivityType::Undo))) => - Ok(CreationResult(ctx.undo(uid, activity).await?)), + Some(BaseType::Object(ObjectType::Activity(ActivityType::Announce))) => + Ok(CreationResult(ctx.announce(uid, activity).await?)), Some(BaseType::Object(ObjectType::Activity(ActivityType::Accept(AcceptType::Accept)))) => Ok(CreationResult(ctx.accept(uid, activity).await?)), @@ -84,6 +84,15 @@ pub async fn post( Some(BaseType::Object(ObjectType::Activity(ActivityType::Reject(RejectType::Reject)))) => Ok(CreationResult(ctx.reject(uid, activity).await?)), + Some(BaseType::Object(ObjectType::Activity(ActivityType::Undo))) => + Ok(CreationResult(ctx.undo(uid, activity).await?)), + + Some(BaseType::Object(ObjectType::Activity(ActivityType::Delete))) => + Ok(CreationResult(ctx.delete(uid, activity).await?)), + + Some(BaseType::Object(ObjectType::Activity(ActivityType::Update))) => + Ok(CreationResult(ctx.update(uid, activity).await?)), + Some(_) => Err(StatusCode::NOT_IMPLEMENTED.into()), } } else {