Make a couple new masto properties optional

This will help prevent deser errors when querying pleroma & older
versions of mastodon
This commit is contained in:
Paul Woolcock
2018-09-19 16:38:03 -04:00
parent 8641eff3e3
commit 580af50687
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -27,5 +27,5 @@ pub struct Relationship {
/// This field is not techincally nullable with mastodon >= 2.5.0, but
/// making it `Option<bool>` here means we shouldn't get deser errors when
/// making calls to pleroma or mastodon<2.5.0 instances
pub endorsed: bool,
pub endorsed: Option<bool>,
}
+1 -1
View File
@@ -31,7 +31,7 @@ pub struct Status {
/// An array of Emoji
pub emojis: Vec<Emoji>,
/// The numbef or replies to this status.
pub replies_count: u64,
pub replies_count: Option<u64>,
/// The number of reblogs for the status.
pub reblogs_count: u64,
/// The number of favourites for the status.