]> Untitled Git - lemmy.git/blob - crates/apub/src/protocol/objects/tombstone.rs
Support mastodon deletes
[lemmy.git] / crates / apub / src / protocol / objects / tombstone.rs
1 use activitystreams::object::kind::TombstoneType;
2 use serde::{Deserialize, Serialize};
3 use serde_with::skip_serializing_none;
4 use url::Url;
5
6 #[skip_serializing_none]
7 #[derive(Clone, Debug, Deserialize, Serialize)]
8 #[serde(rename_all = "camelCase")]
9 pub struct Tombstone {
10   pub(crate) id: Url,
11   #[serde(rename = "type")]
12   kind: TombstoneType,
13 }
14
15 impl Tombstone {
16   pub fn new(id: Url) -> Tombstone {
17     Tombstone {
18       id,
19       kind: TombstoneType::Tombstone,
20     }
21   }
22 }