]> Untitled Git - lemmy.git/blob - crates/apub/src/protocol/activities/following/undo_follow.rs
f94a9b797cce549671ebff1165ddcff2cbf5d517
[lemmy.git] / crates / apub / src / protocol / activities / following / undo_follow.rs
1 use crate::{objects::person::ApubPerson, protocol::activities::following::follow::Follow};
2 use activitypub_federation::{fetch::object_id::ObjectId, kinds::activity::UndoType};
3 use serde::{Deserialize, Serialize};
4 use url::Url;
5
6 #[derive(Clone, Debug, Deserialize, Serialize)]
7 #[serde(rename_all = "camelCase")]
8 pub struct UndoFollow {
9   pub(crate) actor: ObjectId<ApubPerson>,
10   /// Optional, for compatibility with platforms that always expect recipient field
11   pub(crate) to: Option<[ObjectId<ApubPerson>; 1]>,
12   pub(crate) object: Follow,
13   #[serde(rename = "type")]
14   pub(crate) kind: UndoType,
15   pub(crate) id: Url,
16 }