mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-05-07 12:32:40 +00:00
d20d2b9218
* Implement federated user following (fixes #752) * rewrite send_activity_in_community and add docs, remove default for column pending * improve migration * replace null values in db migration
16 lines
519 B
Rust
16 lines
519 B
Rust
use crate::{fetcher::user_or_community::UserOrCommunity, objects::person::ApubPerson};
|
|
use activitypub_federation::core::object_id::ObjectId;
|
|
use activitystreams_kinds::activity::FollowType;
|
|
use serde::{Deserialize, Serialize};
|
|
use url::Url;
|
|
|
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct Follow {
|
|
pub(crate) actor: ObjectId<ApubPerson>,
|
|
pub(crate) object: ObjectId<UserOrCommunity>,
|
|
#[serde(rename = "type")]
|
|
pub(crate) kind: FollowType,
|
|
pub(crate) id: Url,
|
|
}
|