You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemmy/crates/apub/src/protocol/activities/deletion/undo_delete.rs

28 lines
814 B
Rust

use crate::{
objects::person::ApubPerson,
protocol::{activities::deletion::delete::Delete, Unparsed},
};
use activitystreams_kinds::activity::UndoType;
use lemmy_apub_lib::object_id::ObjectId;
use serde::{Deserialize, Serialize};
use url::Url;
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct UndoDelete {
pub(crate) actor: ObjectId<ApubPerson>,
#[serde(deserialize_with = "crate::deserialize_one_or_many")]
pub(crate) to: Vec<Url>,
pub(crate) object: Delete,
#[serde(rename = "type")]
pub(crate) kind: UndoType,
pub(crate) id: Url,
#[serde(deserialize_with = "crate::deserialize_one_or_many")]
#[serde(default)]
#[serde(skip_serializing_if = "Vec::is_empty")]
pub(crate) cc: Vec<Url>,
#[serde(flatten)]
pub(crate) unparsed: Unparsed,
}