diff --git a/src/hooks/messages.rs b/src/hooks/messages.rs index 01c911e..b84d0c5 100644 --- a/src/hooks/messages.rs +++ b/src/hooks/messages.rs @@ -12,12 +12,12 @@ pub struct Recipient { #[derive(Debug, Clone, Default, Deserialize)] pub struct Message { - text: String, + text: Option, } impl Message { - pub fn get_text(&self) -> &String { - &self.text + pub fn get_text(&self) -> String { + self.text.unwrap_or("".into()) } }