]> Untitled Git - lemmy.git/blob - crates/apub/src/protocol/activities/following/undo_follow.rs
Remove ActivityFields trait, deserialize into another struct instead
[lemmy.git] / crates / apub / src / protocol / activities / following / undo_follow.rs
1 use crate::{
2   fetcher::object_id::ObjectId,
3   objects::{community::ApubCommunity, person::ApubPerson},
4   protocol::activities::following::follow::FollowCommunity,
5 };
6 use activitystreams::{activity::kind::UndoType, unparsed::Unparsed};
7 use serde::{Deserialize, Serialize};
8 use url::Url;
9
10 #[derive(Clone, Debug, Deserialize, Serialize)]
11 #[serde(rename_all = "camelCase")]
12 pub struct UndoFollowCommunity {
13   pub(crate) actor: ObjectId<ApubPerson>,
14   pub(crate) to: [ObjectId<ApubCommunity>; 1],
15   pub(crate) object: FollowCommunity,
16   #[serde(rename = "type")]
17   pub(crate) kind: UndoType,
18   pub(crate) id: Url,
19   #[serde(flatten)]
20   pub(crate) unparsed: Unparsed,
21 }