From 9fa2092a21af18f38fb01206fd81fd958b717446 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 3 Oct 2020 09:47:06 -0500 Subject: [PATCH] Adding some logging. --- lemmy_apub/src/activity_queue.rs | 2 +- lemmy_apub/src/community.rs | 5 +++++ lemmy_db/src/activity.rs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lemmy_apub/src/activity_queue.rs b/lemmy_apub/src/activity_queue.rs index 7602fe2f7..68b5c3ab0 100644 --- a/lemmy_apub/src/activity_queue.rs +++ b/lemmy_apub/src/activity_queue.rs @@ -174,7 +174,7 @@ where let activity = activity.into_any_base()?; let serialised_activity = serde_json::to_string(&activity)?; - insert_activity(actor.user_id(), serialised_activity.clone(), true, pool).await?; + insert_activity(actor.user_id(), activity.clone(), true, pool).await?; // TODO: it would make sense to create a separate task for each destination server let message = SendActivityTask { diff --git a/lemmy_apub/src/community.rs b/lemmy_apub/src/community.rs index c2b4571fa..ad9abaaa2 100644 --- a/lemmy_apub/src/community.rs +++ b/lemmy_apub/src/community.rs @@ -1,3 +1,4 @@ +use log::debug; use crate::{ activity_queue::{send_activity_single_dest, send_to_community_followers}, check_actor_domain, @@ -281,6 +282,10 @@ impl ActorType for Community { .unique() .collect(); + // TODO remove this logging line + let inboxes_json = serde_json::to_string_pretty(&inboxes)?; + debug!("Community follower inboxes: {}", inboxes_json); + Ok(inboxes) } diff --git a/lemmy_db/src/activity.rs b/lemmy_db/src/activity.rs index 18b6ef005..6830d566d 100644 --- a/lemmy_db/src/activity.rs +++ b/lemmy_db/src/activity.rs @@ -63,7 +63,7 @@ where T: Serialize + Debug, { debug!("inserting activity for user {}: ", user_id); - debug!("{}", serde_json::to_string_pretty(&serde_json::to_value(&data)?)?); + debug!("{}", serde_json::to_string_pretty(&data)?); let activity_form = ActivityForm { user_id, data: serde_json::to_value(&data)?,