1
0
Fork 0
forked from alemi/upub

fix: oops nuke must put jobs with activity id

This commit is contained in:
əlemi 2024-06-24 02:29:45 +02:00
parent 8df27847ce
commit 48a8ff9fef
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -52,13 +52,13 @@ pub async fn nuke(ctx: upub::Context, for_real: bool, delete_posts: bool) -> Res
}; };
let target = if matches!(activity.activity_type, apb::ActivityType::Follow) { let target = if matches!(activity.activity_type, apb::ActivityType::Follow) {
oid.clone() activity.id.clone()
} else { } else {
let follow_activity = upub::model::activity::Entity::find_by_ap_id(&oid) let follow_activity = upub::model::activity::Entity::find_by_ap_id(&oid)
.one(ctx.db()) .one(ctx.db())
.await? .await?
.ok_or(sea_orm::DbErr::RecordNotFound(oid.clone()))?; .ok_or(sea_orm::DbErr::RecordNotFound(oid.clone()))?;
follow_activity.object.unwrap_or_default() follow_activity.id
}; };
let aid = ctx.aid(&upub::Context::new_id()); let aid = ctx.aid(&upub::Context::new_id());