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