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