Skip to content

Commit 93d920a

Browse files
committed
fix: SlackRichTextList elements type
1 parent cf3a611 commit 93d920a

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/models/blocks/kit.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ pub struct SlackRichTextSection {
11331133
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Builder)]
11341134
pub struct SlackRichTextList {
11351135
pub style: SlackRichTextListStyle,
1136-
pub elements: Vec<SlackRichTextSection>,
1136+
pub elements: Vec<SlackRichTextElement>,
11371137
pub indent: Option<u64>,
11381138
pub offset: Option<u64>,
11391139
pub border: Option<u64>,
@@ -1492,6 +1492,16 @@ mod test {
14921492
assert_eq!(list.style, SlackRichTextListStyle::Bullet);
14931493
assert_eq!(list.elements.len(), 2);
14941494

1495+
// list items are SlackRichTextElement::Section
1496+
assert!(matches!(
1497+
&list.elements[0],
1498+
SlackRichTextElement::Section(_)
1499+
));
1500+
assert!(matches!(
1501+
&list.elements[1],
1502+
SlackRichTextElement::Section(_)
1503+
));
1504+
14951505
// preformatted
14961506
assert!(matches!(
14971507
&rich.elements[2],

0 commit comments

Comments
 (0)