Skip to content

Commit cc120bb

Browse files
🚑 Set "InputBlock" label to "PlainTextObject"
1 parent 27c2681 commit cc120bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

slack/web/classes/blocks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def attributes(self) -> Set[str]:
280280
def __init__(
281281
self,
282282
*,
283-
label: Union[str, dict, TextObject],
283+
label: Union[str, dict, PlainTextObject],
284284
element: Union[str, dict, InputInteractiveElement],
285285
block_id: Optional[str] = None,
286286
hint: Optional[Union[str, dict, PlainTextObject]] = None,
@@ -295,9 +295,9 @@ def __init__(
295295
super().__init__(type=self.type, block_id=block_id)
296296
show_unknown_key_warning(self, others)
297297

298-
self.label = TextObject.parse(label)
298+
self.label = TextObject.parse(label, default_type=PlainTextObject.type)
299299
self.element = BlockElement.parse(element)
300-
self.hint = PlainTextObject.parse(hint)
300+
self.hint = TextObject.parse(hint, default_type=PlainTextObject.type)
301301
self.optional = optional
302302

303303
@JsonValidator(f"label attribute cannot exceed {label_max_length} characters")

0 commit comments

Comments
 (0)