verify_activity,
},
objects::{community::ApubCommunity, person::ApubPerson},
- protocol::activities::deletion::delete::{Delete, IdOrNestedObject},
+ protocol::activities::deletion::delete::{Delete, IdOrNestedObject, NestedObject},
};
use activitystreams_kinds::activity::DeleteType;
use anyhow::anyhow;
Ok(Delete {
actor: ObjectId::new(actor.actor_id.clone()),
to: vec![to],
- object: IdOrNestedObject::Id(object.id()),
+ object: IdOrNestedObject::NestedObject(NestedObject {
+ id: object.id(),
+ kind: Default::default(),
+ }),
cc: cc.into_iter().collect(),
kind: DeleteType::Delete,
summary,
use crate::{objects::person::ApubPerson, protocol::Unparsed};
-use activitystreams_kinds::activity::DeleteType;
+use activitystreams_kinds::{activity::DeleteType, object::TombstoneType};
use lemmy_apub_lib::object_id::ObjectId;
use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none;
#[derive(Clone, Debug, Deserialize, Serialize)]
pub(crate) struct NestedObject {
- id: Url,
+ pub(crate) id: Url,
+ // Backwards compatibility with Lemmy 0.15
+ #[serde(rename = "type")]
+ pub(crate) kind: TombstoneType,
}
impl IdOrNestedObject {