1 use crate::{objects::person::ApubPerson, protocol::activities::following::follow::Follow};
2 use activitypub_federation::{
3 fetch::object_id::ObjectId,
4 kinds::activity::UndoType,
5 protocol::helpers::deserialize_skip_error,
7 use serde::{Deserialize, Serialize};
10 #[derive(Clone, Debug, Deserialize, Serialize)]
11 #[serde(rename_all = "camelCase")]
12 pub struct UndoFollow {
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<ApubPerson>; 1]>,
17 pub(crate) object: Follow,
18 #[serde(rename = "type")]
19 pub(crate) kind: UndoType,