2 objects::person::ApubPerson,
3 protocol::{activities::CreateOrUpdateType, objects::chat_message::ChatMessage},
5 use activitypub_federation::{fetch::object_id::ObjectId, protocol::helpers::deserialize_one};
6 use serde::{Deserialize, Serialize};
9 #[derive(Clone, Debug, Deserialize, Serialize)]
10 #[serde(rename_all = "camelCase")]
11 pub struct CreateOrUpdateChatMessage {
13 pub(crate) actor: ObjectId<ApubPerson>,
14 #[serde(deserialize_with = "deserialize_one")]
15 pub(crate) to: [ObjectId<ApubPerson>; 1],
16 pub(crate) object: ChatMessage,
17 #[serde(rename = "type")]
18 pub(crate) kind: CreateOrUpdateType,