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 {
+use log::debug;
use crate::{
activity_queue::{send_activity_single_dest, send_to_community_followers},
check_actor_domain,
.unique()
.collect();
+ // TODO remove this logging line
+ let inboxes_json = serde_json::to_string_pretty(&inboxes)?;
+ debug!("Community follower inboxes: {}", inboxes_json);
+
Ok(inboxes)
}
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)?,