]> Untitled Git - lemmy.git/blob - crates/apub/src/protocol/activities/following/follow.rs
Implement federated user following (fixes #752) (#2577)
[lemmy.git] / crates / apub / src / protocol / activities / following / follow.rs
1 use crate::{fetcher::user_or_community::UserOrCommunity, objects::person::ApubPerson};
2 use activitypub_federation::core::object_id::ObjectId;
3 use activitystreams_kinds::activity::FollowType;
4 use serde::{Deserialize, Serialize};
5 use url::Url;
6
7 #[derive(Clone, Debug, Deserialize, Serialize)]
8 #[serde(rename_all = "camelCase")]
9 pub struct Follow {
10   pub(crate) actor: ObjectId<ApubPerson>,
11   pub(crate) object: ObjectId<UserOrCommunity>,
12   #[serde(rename = "type")]
13   pub(crate) kind: FollowType,
14   pub(crate) id: Url,
15 }