.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!())?;
) -> 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)
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)?,