+#[async_trait::async_trait]
+impl SendActivity for CreateComment {
+ type Response = CommentResponse;
+
+ async fn send_activity(
+ _request: &Self,
+ response: &Self::Response,
+ context: &Data<LemmyContext>,
+ ) -> Result<(), LemmyError> {
+ CreateOrUpdateNote::send(
+ &response.comment_view.comment,
+ response.comment_view.creator.id,
+ CreateOrUpdateType::Create,
+ context,
+ )
+ .await
+ }
+}
+
+#[async_trait::async_trait]
+impl SendActivity for EditComment {
+ type Response = CommentResponse;
+
+ async fn send_activity(
+ _request: &Self,
+ response: &Self::Response,
+ context: &Data<LemmyContext>,
+ ) -> Result<(), LemmyError> {
+ CreateOrUpdateNote::send(
+ &response.comment_view.comment,
+ response.comment_view.creator.id,
+ CreateOrUpdateType::Update,
+ context,
+ )
+ .await
+ }
+}
+