fix(activitypub-base): deterministic announce IDs so Undo(Announce) can reference original activity

This commit is contained in:
2026-05-14 14:16:48 +02:00
parent b0b3c6a59b
commit 2485869af6
2 changed files with 39 additions and 1 deletions

View File

@@ -414,6 +414,21 @@ mod tests {
assert_eq!(undo_announced[0], "https://mastodon.social/users/bob/statuses/456");
}
#[tokio::test]
async fn boost_removed_does_not_broadcast_if_thought_missing() {
let store = TestStore::default();
let alice = alice();
let spy = Arc::new(SpyPort::default());
svc(&store, spy.clone())
.process(&DomainEvent::BoostRemoved {
user_id: alice.id.clone(),
thought_id: ThoughtId::new(), // doesn't exist in store
})
.await
.unwrap();
assert!(spy.undo_announced.lock().unwrap().is_empty());
}
#[tokio::test]
async fn thought_updated_does_not_broadcast_if_user_missing() {
let store = TestStore::default();