Fixing pretty print again.

This commit is contained in:
Dessalines 2020-10-02 10:15:26 -05:00
parent eef0a5c7e8
commit 2e2b6eacd7
3 changed files with 4 additions and 6 deletions

View file

@ -259,6 +259,7 @@ impl ActorType for Community {
.await??;
let inboxes = inboxes
.into_iter()
.filter(|i| !i.user_local)
.map(|u| -> Result<Url, LemmyError> {
let url = Url::parse(&u.user_actor_id)?;
let domain = url.domain().context(location_info!())?;

View file

@ -60,7 +60,7 @@ pub async fn shared_inbox(
) -> Result<HttpResponse, LemmyError> {
let activity = input.into_inner();
let json = serde_json::to_string(&activity)?;
let json = serde_json::to_string_pretty(&activity)?;
debug!("Shared inbox received activity: {}", json);
// TODO: if we already received an activity with identical ID, then ignore this (same in other inboxes)

View file

@ -62,11 +62,8 @@ pub fn do_insert_activity<T>(
where
T: Serialize + Debug,
{
debug!(
"inserting activity for user {}, data {:?}",
user_id,
serde_json::to_string_pretty(&data).unwrap()
);
debug!("inserting activity for user {}: ", user_id);
debug!("{}", serde_json::to_string_pretty(&serde_json::to_value(&data)?)?);
let activity_form = ActivityForm {
user_id,
data: serde_json::to_value(&data)?,