fix: fallback to empty string when deserialising
This commit is contained in:
@@ -76,7 +76,7 @@ auto_derived!(
|
|||||||
/// User's active status
|
/// User's active status
|
||||||
pub struct UserStatus {
|
pub struct UserStatus {
|
||||||
/// Custom status text
|
/// Custom status text
|
||||||
#[serde(skip_serializing_if = "String::is_empty")]
|
#[serde(skip_serializing_if = "String::is_empty", default)]
|
||||||
pub text: String,
|
pub text: String,
|
||||||
/// Current presence option
|
/// Current presence option
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
@@ -86,7 +86,7 @@ auto_derived!(
|
|||||||
/// User's profile
|
/// User's profile
|
||||||
pub struct UserProfile {
|
pub struct UserProfile {
|
||||||
/// Text content on user's profile
|
/// Text content on user's profile
|
||||||
#[serde(skip_serializing_if = "String::is_empty")]
|
#[serde(skip_serializing_if = "String::is_empty", default)]
|
||||||
pub content: String,
|
pub content: String,
|
||||||
/// Background visible on user's profile
|
/// Background visible on user's profile
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
|||||||
Reference in New Issue
Block a user