Fix the attributes of Attachment (#5)

* Fix Attachment.text_url not being nullable

* Add missing "unknown" attribute to MediaType, which is not in the documentation by TootSuite

https://github.com/tootsuite/mastodon/blob/b97ebaf6202debb8c24d6f726886a594f02a6d3b/app/models/media_attachment.rb#L24
This commit is contained in:
wariuni
2017-06-05 10:55:50 +01:00
committed by Aaron Power
parent d1063570f6
commit 34f17ebcc0
+3 -1
View File
@@ -6,7 +6,7 @@ pub struct Attachment {
pub url: String,
pub remote_url: String,
pub preview_url: String,
pub text_url: String,
pub text_url: Option<String>,
}
#[derive(Debug, Deserialize, Clone, Copy)]
@@ -17,4 +17,6 @@ pub enum MediaType {
Video,
#[serde(rename = "gifv")]
Gifv,
#[serde(rename = "unknown")]
Unknown,
}