2 objects::{community::ApubCommunity, person::ApubPerson},
3 protocol::activities::following::follow::Follow,
5 use activitypub_federation::{
6 fetch::object_id::ObjectId,
7 kinds::activity::AcceptType,
8 protocol::helpers::deserialize_skip_error,
10 use serde::{Deserialize, Serialize};
13 #[derive(Clone, Debug, Deserialize, Serialize)]
14 #[serde(rename_all = "camelCase")]
15 pub struct AcceptFollow {
16 pub(crate) actor: ObjectId<ApubCommunity>,
17 /// Optional, for compatibility with platforms that always expect recipient field
18 #[serde(deserialize_with = "deserialize_skip_error", default)]
19 pub(crate) to: Option<[ObjectId<ApubPerson>; 1]>,
20 pub(crate) object: Follow,
21 #[serde(rename = "type")]
22 pub(crate) kind: AcceptType,