From 2bf2456496aa348ce1f45ca7fe02335f7f063909 Mon Sep 17 00:00:00 2001 From: Ricardo Martins Date: Sun, 3 Feb 2019 15:00:05 +0000 Subject: [PATCH] Fix type of `StatusBuilder::media_ids` The identifier in the JSON response to a POST to `/media` is a string, as can be seen in the Attachment entity. Even though that identifier has always been a string of numbers (at least in Mastodon's case), it should not be assumed that it will continue to be so in the future, so keeping it as a String seems more prudent. Additionally, this simplifies the process of posting a new status with an attachment, as it is no longer necessary to parse the resulting attachment's id to an u64. --- src/status_builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/status_builder.rs b/src/status_builder.rs index 15c5fee..197d540 100644 --- a/src/status_builder.rs +++ b/src/status_builder.rs @@ -26,7 +26,7 @@ pub struct StatusBuilder { pub in_reply_to_id: Option, /// Ids of media attachments being attached to the status. #[serde(skip_serializing_if = "Option::is_none")] - pub media_ids: Option>, + pub media_ids: Option>, /// Whether current status is sensitive. #[serde(skip_serializing_if = "Option::is_none")] pub sensitive: Option,