From 52933da8208670aee44458035b00d8960af6bdf3 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 15 Aug 2024 05:41:50 +0200 Subject: [PATCH] fix: ughhh must use activity id from payload i should go to sleep ... --- upub/worker/src/outbound.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upub/worker/src/outbound.rs b/upub/worker/src/outbound.rs index 3d4c6b4..1cfb676 100644 --- a/upub/worker/src/outbound.rs +++ b/upub/worker/src/outbound.rs @@ -17,9 +17,9 @@ pub async fn process(ctx: Context, job: &model::job::Model) -> crate::JobResult< let actor = upub::model::actor::Entity::ap_to_internal(&job.actor, &tx) .await? .ok_or_else(|| DbErr::RecordNotFound(job.actor.clone()))?; - let activity = upub::model::activity::Entity::ap_to_internal(&job.activity, &tx) + let activity = upub::model::activity::Entity::ap_to_internal(activity.object().id()?, &tx) .await? - .ok_or_else(|| DbErr::RecordNotFound(job.activity.clone()))?; + .ok_or_else(|| DbErr::RecordNotFound(activity.object().id().unwrap_or_default().to_string()))?; let notif_model = upub::model::notification::ActiveModel { internal: sea_orm::ActiveValue::NotSet, activity: sea_orm::ActiveValue::Unchanged(activity),