fix(ap): use Note id (not Create activity id) in CreateActivity::receive — fixes Delete sync

This commit is contained in:
2026-05-15 10:58:13 +02:00
parent 4b20bfd369
commit db1625dc0d

View File

@@ -341,7 +341,14 @@ impl Activity for CreateActivity {
tracing::info!(actor = %self.actor(), "ignoring activity from blocked domain"); tracing::info!(actor = %self.actor(), "ignoring activity from blocked domain");
return Ok(()); return Ok(());
} }
let ap_id = self.id.clone(); // Use the Note's own id, not the Create activity id (which ends in /activity).
// Delete activities reference the Note id, so they must match.
let ap_id = self
.object
.get("id")
.and_then(|v| v.as_str())
.and_then(|s| Url::parse(s).ok())
.unwrap_or_else(|| self.id.clone());
let actor_url = self.actor.inner().clone(); let actor_url = self.actor.inner().clone();
data.object_handler data.object_handler
.on_create(&ap_id, &actor_url, self.object) .on_create(&ap_id, &actor_url, self.object)