mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 18:01:00 +00:00
Fixing pretty print again.
This commit is contained in:
parent
eef0a5c7e8
commit
2e2b6eacd7
3 changed files with 4 additions and 6 deletions
|
@ -259,6 +259,7 @@ impl ActorType for Community {
|
||||||
.await??;
|
.await??;
|
||||||
let inboxes = inboxes
|
let inboxes = inboxes
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
.filter(|i| !i.user_local)
|
||||||
.map(|u| -> Result<Url, LemmyError> {
|
.map(|u| -> Result<Url, LemmyError> {
|
||||||
let url = Url::parse(&u.user_actor_id)?;
|
let url = Url::parse(&u.user_actor_id)?;
|
||||||
let domain = url.domain().context(location_info!())?;
|
let domain = url.domain().context(location_info!())?;
|
||||||
|
|
|
@ -60,7 +60,7 @@ pub async fn shared_inbox(
|
||||||
) -> Result<HttpResponse, LemmyError> {
|
) -> Result<HttpResponse, LemmyError> {
|
||||||
let activity = input.into_inner();
|
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);
|
debug!("Shared inbox received activity: {}", json);
|
||||||
|
|
||||||
// TODO: if we already received an activity with identical ID, then ignore this (same in other inboxes)
|
// TODO: if we already received an activity with identical ID, then ignore this (same in other inboxes)
|
||||||
|
|
|
@ -62,11 +62,8 @@ pub fn do_insert_activity<T>(
|
||||||
where
|
where
|
||||||
T: Serialize + Debug,
|
T: Serialize + Debug,
|
||||||
{
|
{
|
||||||
debug!(
|
debug!("inserting activity for user {}: ", user_id);
|
||||||
"inserting activity for user {}, data {:?}",
|
debug!("{}", serde_json::to_string_pretty(&serde_json::to_value(&data)?)?);
|
||||||
user_id,
|
|
||||||
serde_json::to_string_pretty(&data).unwrap()
|
|
||||||
);
|
|
||||||
let activity_form = ActivityForm {
|
let activity_form = ActivityForm {
|
||||||
user_id,
|
user_id,
|
||||||
data: serde_json::to_value(&data)?,
|
data: serde_json::to_value(&data)?,
|
||||||
|
|
Loading…
Reference in a new issue