Revert "Add logging to debug federation issues (ref #2096) (#2099)"

This reverts commit e094989a4c.
This commit is contained in:
Felix Ableitner 2022-03-14 20:30:30 +01:00 committed by Dessalines
parent 550a93aed9
commit ee80f2e3da
3 changed files with 2 additions and 18 deletions

View file

@ -14,7 +14,6 @@ use lemmy_apub_lib::{
}; };
use lemmy_utils::LemmyError; use lemmy_utils::LemmyError;
use lemmy_websocket::LemmyContext; use lemmy_websocket::LemmyContext;
use tracing::info;
#[async_trait::async_trait(?Send)] #[async_trait::async_trait(?Send)]
pub(crate) trait GetCommunity { pub(crate) trait GetCommunity {
@ -52,14 +51,6 @@ impl AnnounceActivity {
context: &LemmyContext, context: &LemmyContext,
) -> Result<(), LemmyError> { ) -> Result<(), LemmyError> {
let announce = AnnounceActivity::new(object.clone(), community, context)?; let announce = AnnounceActivity::new(object.clone(), community, context)?;
// temporary hack to get activity id of object
let object_fields: ActivityCommonFields =
serde_json::from_value(serde_json::to_value(&object)?)?;
info!(
"Announcing activity {} as {}",
object_fields.id, announce.id
);
let inboxes = community.get_follower_inboxes(context).await?; let inboxes = community.get_follower_inboxes(context).await?;
send_lemmy_activity( send_lemmy_activity(
context, context,

View file

@ -26,7 +26,6 @@ use lemmy_db_schema::{
}; };
use lemmy_utils::LemmyError; use lemmy_utils::LemmyError;
use lemmy_websocket::{send::send_comment_ws_message, LemmyContext, UserOperationCrud}; use lemmy_websocket::{send::send_comment_ws_message, LemmyContext, UserOperationCrud};
use tracing::info;
impl CreateOrUpdateComment { impl CreateOrUpdateComment {
#[tracing::instrument(skip(comment, actor, kind, context))] #[tracing::instrument(skip(comment, actor, kind, context))]
@ -51,7 +50,6 @@ impl CreateOrUpdateComment {
kind.clone(), kind.clone(),
&context.settings().get_protocol_and_hostname(), &context.settings().get_protocol_and_hostname(),
)?; )?;
info!("Sending Create/Comment for {} as {}", comment.ap_id, id);
let note = comment.into_apub(context).await?; let note = comment.into_apub(context).await?;
let create_or_update = CreateOrUpdateComment { let create_or_update = CreateOrUpdateComment {

View file

@ -6,7 +6,6 @@ use crate::{
objects::{community::ApubCommunity, person::ApubPerson}, objects::{community::ApubCommunity, person::ApubPerson},
}; };
use activitystreams_kinds::public; use activitystreams_kinds::public;
use itertools::Itertools;
use lemmy_api_common::blocking; use lemmy_api_common::blocking;
use lemmy_apub_lib::{ use lemmy_apub_lib::{
activity_queue::send_activity, activity_queue::send_activity,
@ -171,6 +170,8 @@ async fn send_lemmy_activity<T: Serialize>(
} }
let activity = WithContext::new(activity); let activity = WithContext::new(activity);
info!("Sending activity {}", activity_id.to_string());
// Don't send anything to ourselves // Don't send anything to ourselves
// TODO: this should be a debug assert // TODO: this should be a debug assert
let hostname = context.settings().get_hostname_without_port()?; let hostname = context.settings().get_hostname_without_port()?;
@ -179,12 +180,6 @@ async fn send_lemmy_activity<T: Serialize>(
.filter(|i| i.domain().expect("valid inbox url") != hostname) .filter(|i| i.domain().expect("valid inbox url") != hostname)
.collect(); .collect();
info!(
"Sending activity {} to [{}]",
activity_id.to_string(),
inboxes.iter().join(",")
);
let serialised_activity = serde_json::to_string(&activity)?; let serialised_activity = serde_json::to_string(&activity)?;
let object_value = serde_json::to_value(&activity)?; let object_value = serde_json::to_value(&activity)?;