From a75701d9c6483cc3a68a9bc3de3fac694514bdf4 Mon Sep 17 00:00:00 2001 From: Quat3rnion Date: Sun, 2 Jun 2024 20:06:01 -0400 Subject: [PATCH] Allow last_pin_timestamp to default if field is not in responses. --- src/types/entities/channel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/entities/channel.rs b/src/types/entities/channel.rs index dc1e6ad..b5e604d 100644 --- a/src/types/entities/channel.rs +++ b/src/types/entities/channel.rs @@ -60,7 +60,7 @@ pub struct Channel { pub icon: Option, pub id: Snowflake, pub last_message_id: Option, - #[serde(with = "ts_seconds_option_str")] + #[serde(with = "ts_seconds_option_str", default)] pub last_pin_timestamp: Option>, pub managed: Option, #[cfg_attr(feature = "sqlx", sqlx(skip))]