From 8a93a7368e5da9556113325e20aa6af831ed4c8e Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 7 Jun 2024 15:18:36 +0200 Subject: [PATCH] fix: oops undo of undo was my mistake --- upub/core/src/traits/process.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/upub/core/src/traits/process.rs b/upub/core/src/traits/process.rs index bfa7406a..596b6b87 100644 --- a/upub/core/src/traits/process.rs +++ b/upub/core/src/traits/process.rs @@ -297,12 +297,11 @@ pub async fn undo(ctx: &crate::Context, activity: impl apb::Activity, tx: &Datab .await? .ok_or(ProcessorError::Incomplete)?; - let activity_type = activity.activity_type()?; let targets = ctx.expand_addressing(activity.addressed(), tx).await?; let activity_model = ctx.insert_activity(activity, tx).await?; ctx.address_to(Some(activity_model.internal), None, &targets, tx).await?; - match activity_type { + match undone_activity.as_activity()?.activity_type()? { apb::ActivityType::Like => { let internal_oid = crate::model::object::Entity::ap_to_internal(&undone_activity_target, tx) .await?