2022-04-07 20:52:17 +00:00
|
|
|
use crate::objects::person::ApubPerson;
|
2023-03-21 15:03:05 +00:00
|
|
|
use activitypub_federation::{
|
2023-09-23 01:39:03 +00:00
|
|
|
fetch::object_id::ObjectId, kinds::activity::DeleteType,
|
2023-03-21 15:03:05 +00:00
|
|
|
protocol::helpers::deserialize_one_or_many,
|
|
|
|
};
|
2022-04-07 20:52:17 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use serde_with::skip_serializing_none;
|
|
|
|
use url::Url;
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
pub struct DeleteUser {
|
|
|
|
pub(crate) actor: ObjectId<ApubPerson>,
|
2022-06-02 14:33:41 +00:00
|
|
|
#[serde(deserialize_with = "deserialize_one_or_many")]
|
2022-04-07 20:52:17 +00:00
|
|
|
pub(crate) to: Vec<Url>,
|
|
|
|
pub(crate) object: ObjectId<ApubPerson>,
|
|
|
|
#[serde(rename = "type")]
|
|
|
|
pub(crate) kind: DeleteType,
|
|
|
|
pub(crate) id: Url,
|
|
|
|
|
2022-06-02 14:33:41 +00:00
|
|
|
#[serde(deserialize_with = "deserialize_one_or_many", default)]
|
2022-04-07 20:52:17 +00:00
|
|
|
#[serde(skip_serializing_if = "Vec::is_empty")]
|
|
|
|
pub(crate) cc: Vec<Url>,
|
2023-08-28 10:23:45 +00:00
|
|
|
/// Nonstandard field. If present, all content from the user should be deleted along with the account
|
|
|
|
pub(crate) remove_data: Option<bool>,
|
2022-04-07 20:52:17 +00:00
|
|
|
}
|