diff --git a/src/activitypub/activity.rs b/src/activitypub/activity.rs index 1c6690d..bda0e04 100644 --- a/src/activitypub/activity.rs +++ b/src/activitypub/activity.rs @@ -31,12 +31,14 @@ pub struct Attachment { pub url: Option, } +fn default_tag_type() -> String { HASHTAG.to_string() } + #[derive(Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct Tag { pub name: String, - #[serde(rename = "type")] + #[serde(rename = "type", default = "default_tag_type")] pub tag_type: String, pub href: Option,