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