mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-01 00:28:05 +00:00
6f513793cb
* update activitypub-federation crate to 0.4.0 * fixes * apub compiles! * everything compiling! * almost done, federated follow failing * some test fixes * use release * add code back in
30 lines
598 B
Rust
30 lines
598 B
Rust
use crate::protocol::Id;
|
|
use activitypub_federation::kinds::object::TombstoneType;
|
|
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 Tombstone {
|
|
pub(crate) id: Url,
|
|
#[serde(rename = "type")]
|
|
pub(crate) kind: TombstoneType,
|
|
}
|
|
|
|
impl Tombstone {
|
|
pub fn new(id: Url) -> Tombstone {
|
|
Tombstone {
|
|
id,
|
|
kind: TombstoneType::Tombstone,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Id for Tombstone {
|
|
fn object_id(&self) -> &Url {
|
|
&self.id
|
|
}
|
|
}
|