@@ -33,7 +33,6 @@ pub enum SlackBlock {
3333 Video ( SlackVideoBlock ) ,
3434 #[ serde( rename = "markdown" ) ]
3535 Markdown ( SlackMarkdownBlock ) ,
36-
3736 #[ serde( rename = "rich_text" ) ]
3837 RichText ( SlackRichTextBlock ) ,
3938 #[ serde( rename = "share_shortcut" ) ]
@@ -1100,6 +1099,30 @@ pub enum SlackRichTextElement {
11001099 Quote ( SlackRichTextQuote ) ,
11011100}
11021101
1102+ impl From < SlackRichTextSection > for SlackRichTextElement {
1103+ fn from ( element : SlackRichTextSection ) -> Self {
1104+ SlackRichTextElement :: Section ( element)
1105+ }
1106+ }
1107+
1108+ impl From < SlackRichTextList > for SlackRichTextElement {
1109+ fn from ( list : SlackRichTextList ) -> Self {
1110+ SlackRichTextElement :: List ( list)
1111+ }
1112+ }
1113+
1114+ impl From < SlackRichTextPreformatted > for SlackRichTextElement {
1115+ fn from ( element : SlackRichTextPreformatted ) -> Self {
1116+ SlackRichTextElement :: Preformatted ( element)
1117+ }
1118+ }
1119+
1120+ impl From < SlackRichTextQuote > for SlackRichTextElement {
1121+ fn from ( element : SlackRichTextQuote ) -> Self {
1122+ SlackRichTextElement :: Quote ( element)
1123+ }
1124+ }
1125+
11031126#[ skip_serializing_none]
11041127#[ derive( Debug , PartialEq , Clone , Serialize , Deserialize , Builder ) ]
11051128pub struct SlackRichTextSection {
@@ -1184,7 +1207,7 @@ pub struct SlackRichTextText {
11841207#[ skip_serializing_none]
11851208#[ derive( Debug , PartialEq , Clone , Serialize , Deserialize , Builder ) ]
11861209pub struct SlackRichTextLink {
1187- pub url : String ,
1210+ pub url : Url ,
11881211 pub text : Option < String > ,
11891212 #[ serde( rename = "unsafe" ) ]
11901213 pub unsafe_ : Option < bool > ,
@@ -1222,7 +1245,7 @@ pub struct SlackRichTextEmoji {
12221245#[ skip_serializing_none]
12231246#[ derive( Debug , PartialEq , Clone , Serialize , Deserialize , Builder ) ]
12241247pub struct SlackRichTextDate {
1225- pub timestamp : i64 ,
1248+ pub timestamp : SlackDateTime ,
12261249 pub format : String ,
12271250 pub fallback : Option < String > ,
12281251 pub style : Option < SlackRichTextStyle > ,
0 commit comments