2018-05-12 05:31:33 +00:00
|
|
|
use serde_json;
|
|
|
|
|
|
|
|
use super::{kind::AnnounceType, properties::ActivityProperties, Activity};
|
2018-05-12 05:39:47 +00:00
|
|
|
|
2018-05-12 19:35:10 +00:00
|
|
|
use error::Result;
|
2018-05-12 05:31:33 +00:00
|
|
|
use link::Link;
|
|
|
|
use object::{Object, ObjectProperties};
|
|
|
|
use Properties;
|
|
|
|
|
2018-05-12 19:35:10 +00:00
|
|
|
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
2018-05-12 05:31:33 +00:00
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
pub struct Announce {
|
|
|
|
#[serde(rename = "type")]
|
|
|
|
kind: AnnounceType,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
|
|
|
#[activitystreams(ab(Object, Link))]
|
2018-05-12 05:31:33 +00:00
|
|
|
actor: serde_json::Value,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
|
|
|
#[activitystreams(ab(Object, Link))]
|
2018-05-12 05:31:33 +00:00
|
|
|
object: serde_json::Value,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
2018-05-12 05:31:33 +00:00
|
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
2018-05-12 19:35:10 +00:00
|
|
|
#[activitystreams(ab(Object, Link))]
|
2018-05-12 05:31:33 +00:00
|
|
|
target: Option<serde_json::Value>,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
2018-05-12 05:31:33 +00:00
|
|
|
#[serde(flatten)]
|
|
|
|
pub object_props: ObjectProperties,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
2018-05-12 05:31:33 +00:00
|
|
|
#[serde(flatten)]
|
|
|
|
pub activity_props: ActivityProperties,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Object for Announce {}
|
|
|
|
impl Activity for Announce {}
|