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