From 746c5e592120e1de87e0f423baab801225f05c8a Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 27 Mar 2024 04:40:50 +0100 Subject: [PATCH] fix: log follow request accept/reject --- src/activitypub/user/inbox.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/activitypub/user/inbox.rs b/src/activitypub/user/inbox.rs index f0fb029c..280a213c 100644 --- a/src/activitypub/user/inbox.rs +++ b/src/activitypub/user/inbox.rs @@ -129,6 +129,8 @@ pub async fn post( return Err(StatusCode::FORBIDDEN.into()); } + tracing::info!("{} accepted follow request by {}", activity_model.actor, follow_activity.actor); + model::relation::Entity::insert( model::relation::ActiveModel { follower: Set(follow_activity.actor), @@ -155,6 +157,7 @@ pub async fn post( if follow_activity.object.unwrap_or("".into()) != activity_model.actor { return Err(StatusCode::FORBIDDEN.into()); } + tracing::info!("{} rejected follow request by {}", activity_model.actor, follow_activity.actor); ctx.address_to(&activity_model.id, None, &object.addressed()).await?; Ok(()) },