mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-05-20 10:48:05 +00:00
7fd14b3d2a
* Make remove content optional during account deletion (fixes #1617) * simplify purge params by passing context * update js client * add delete content * update woodpecker config --------- Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
29 lines
943 B
Rust
29 lines
943 B
Rust
use crate::objects::person::ApubPerson;
|
|
use activitypub_federation::{
|
|
fetch::object_id::ObjectId,
|
|
kinds::activity::DeleteType,
|
|
protocol::helpers::deserialize_one_or_many,
|
|
};
|
|
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>,
|
|
#[serde(deserialize_with = "deserialize_one_or_many")]
|
|
pub(crate) to: Vec<Url>,
|
|
pub(crate) object: ObjectId<ApubPerson>,
|
|
#[serde(rename = "type")]
|
|
pub(crate) kind: DeleteType,
|
|
pub(crate) id: Url,
|
|
|
|
#[serde(deserialize_with = "deserialize_one_or_many", default)]
|
|
#[serde(skip_serializing_if = "Vec::is_empty")]
|
|
pub(crate) cc: Vec<Url>,
|
|
/// Nonstandard field. If present, all content from the user should be deleted along with the account
|
|
pub(crate) remove_data: Option<bool>,
|
|
}
|