diff options
Diffstat (limited to 'server/src/apub/comment.rs')
-rw-r--r-- | server/src/apub/comment.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/src/apub/comment.rs b/server/src/apub/comment.rs index 3b647fa3..731f44ab 100644 --- a/server/src/apub/comment.rs +++ b/server/src/apub/comment.rs @@ -101,6 +101,16 @@ impl ApubObjectType for Comment { .create_props .set_actor_xsd_any_uri(creator.actor_id.to_owned())? .set_object_base_box(note)?; + + // Insert the sent activity into the activity table + let activity_form = activity::ActivityForm { + user_id: creator.id, + data: serde_json::to_value(&create)?, + local: true, + updated: None, + }; + activity::Activity::create(&conn, &activity_form)?; + send_activity( &create, &creator.private_key.as_ref().unwrap(), @@ -125,6 +135,16 @@ impl ApubObjectType for Comment { .update_props .set_actor_xsd_any_uri(creator.actor_id.to_owned())? .set_object_base_box(note)?; + + // Insert the sent activity into the activity table + let activity_form = activity::ActivityForm { + user_id: creator.id, + data: serde_json::to_value(&update)?, + local: true, + updated: None, + }; + activity::Activity::create(&conn, &activity_form)?; + send_activity( &update, &creator.private_key.as_ref().unwrap(), |