fix: align follow event with accepted state; redact internal error details

This commit is contained in:
2026-05-14 04:10:27 +02:00
parent c5d262c68f
commit f75e796faf
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ pub async fn follow_user(follows: &dyn FollowRepository, events: &dyn EventPubli
if follower_id == following_id { return Err(DomainError::InvalidInput("cannot follow yourself".into())); }
let follow = Follow { follower_id: follower_id.clone(), following_id: following_id.clone(), state: FollowState::Accepted, ap_id: None, created_at: Utc::now() };
follows.save(&follow).await?;
events.publish(&DomainEvent::FollowRequested { follower_id: follower_id.clone(), following_id: following_id.clone() }).await?;
events.publish(&DomainEvent::FollowAccepted { follower_id: follower_id.clone(), following_id: following_id.clone() }).await?;
Ok(())
}