]> Untitled Git - lemmy.git/blob - crates/apub/src/protocol/activities/deletion/delete.rs
Merge pull request #1877 from LemmyNet/refactor-apub-2
[lemmy.git] / crates / apub / src / protocol / activities / deletion / delete.rs
1 use crate::objects::person::ApubPerson;
2 use activitystreams::{activity::kind::DeleteType, unparsed::Unparsed};
3 use lemmy_apub_lib::object_id::ObjectId;
4 use serde::{Deserialize, Serialize};
5 use serde_with::skip_serializing_none;
6 use url::Url;
7
8 #[skip_serializing_none]
9 #[derive(Clone, Debug, Deserialize, Serialize)]
10 #[serde(rename_all = "camelCase")]
11 pub struct Delete {
12   pub(crate) actor: ObjectId<ApubPerson>,
13   pub(crate) to: Vec<Url>,
14   pub(crate) object: Url,
15   pub(crate) cc: Vec<Url>,
16   #[serde(rename = "type")]
17   pub(crate) kind: DeleteType,
18   /// If summary is present, this is a mod action (Remove in Lemmy terms). Otherwise, its a user
19   /// deleting their own content.
20   pub(crate) summary: Option<String>,
21   pub(crate) id: Url,
22   #[serde(flatten)]
23   pub(crate) unparsed: Unparsed,
24 }