diff options
author | Paul Woolcock <paul@woolcock.us> | 2019-03-05 23:38:28 -0500 |
---|---|---|
committer | Paul Woolcock <paul@woolcock.us> | 2019-03-05 23:38:28 -0500 |
commit | dd720348495e877c23b713978b7e6f82cb384fa8 (patch) | |
tree | 28d61dd3f763c60d601bb6ce7947d1d319125df0 | |
parent | 8e700cf37ba51a35b1a8afefbfa4f0fed69aeb92 (diff) |
use string for status id in StatusBuilder
-rw-r--r-- | src/registration.rs | 9 | ||||
-rw-r--r-- | src/status_builder.rs | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/registration.rs b/src/registration.rs index ddd59f3..7f72640 100644 --- a/src/registration.rs +++ b/src/registration.rs @@ -284,12 +284,9 @@ impl<H: HttpSend> Registered<H> { /// provided by the authorisation url. pub fn complete(&self, code: &str) -> Result<Mastodon<H>> { let url = format!( - "{}/oauth/token?client_id={}&client_secret={}&code={}&grant_type=authorization_code&redirect_uri={}", - self.base, - self.client_id, - self.client_secret, - code, - self.redirect + "{}/oauth/token?client_id={}&client_secret={}&code={}&grant_type=authorization_code&\ + redirect_uri={}", + self.base, self.client_id, self.client_secret, code, self.redirect ); let token: AccessToken = self.send(self.client.post(&url))?.json()?; diff --git a/src/status_builder.rs b/src/status_builder.rs index 197d540..06a25ea 100644 --- a/src/status_builder.rs +++ b/src/status_builder.rs @@ -21,9 +21,9 @@ use std::fmt; pub struct StatusBuilder { /// The text of the status. pub status: String, - /// Ids of accounts being replied to. + /// Id of status being replied to. #[serde(skip_serializing_if = "Option::is_none")] - pub in_reply_to_id: Option<u64>, + pub in_reply_to_id: Option<String>, /// Ids of media attachments being attached to the status. #[serde(skip_serializing_if = "Option::is_none")] pub media_ids: Option<Vec<String>>, |