+#[async_trait::async_trait]
+impl SendActivity for CreatePrivateMessage {
+ type Response = PrivateMessageResponse;
+
+ async fn send_activity(
+ _request: &Self,
+ response: &Self::Response,
+ context: &Data<LemmyContext>,
+ ) -> Result<(), LemmyError> {
+ CreateOrUpdateChatMessage::send(
+ &response.private_message_view.private_message,
+ response.private_message_view.creator.id,
+ CreateOrUpdateType::Create,
+ context,
+ )
+ .await
+ }
+}
+#[async_trait::async_trait]
+impl SendActivity for EditPrivateMessage {
+ type Response = PrivateMessageResponse;
+
+ async fn send_activity(
+ _request: &Self,
+ response: &Self::Response,
+ context: &Data<LemmyContext>,
+ ) -> Result<(), LemmyError> {
+ CreateOrUpdateChatMessage::send(
+ &response.private_message_view.private_message,
+ response.private_message_view.creator.id,
+ CreateOrUpdateType::Update,
+ context,
+ )
+ .await
+ }
+}
+
+impl CreateOrUpdateChatMessage {