1 use crate::{fetcher::user_or_community::UserOrCommunity, objects::person::ApubPerson};
2 use activitypub_federation::{
3 fetch::object_id::ObjectId,
4 kinds::activity::FollowType,
5 protocol::helpers::deserialize_skip_error,
7 use serde::{Deserialize, Serialize};
10 #[derive(Clone, Debug, Deserialize, Serialize)]
11 #[serde(rename_all = "camelCase")]
13 pub(crate) actor: ObjectId<ApubPerson>,
14 /// Optional, for compatibility with platforms that always expect recipient field
15 #[serde(deserialize_with = "deserialize_skip_error", default)]
16 pub(crate) to: Option<[ObjectId<UserOrCommunity>; 1]>,
17 pub(crate) object: ObjectId<UserOrCommunity>,
18 #[serde(rename = "type")]
19 pub(crate) kind: FollowType,