@@ -20,7 +20,8 @@ class CreateAPostInAGivenStream extends Request implements HasBody
2020
2121 public function __construct (
2222 protected readonly string $ streamId ,
23- protected readonly string $ text ,
23+ protected readonly ?string $ text = null ,
24+ protected readonly ?string $ html = null ,
2425 protected readonly ?string $ title = null ,
2526 protected null |array |Collection $ labels = null ,
2627 protected readonly bool $ sticky = false ,
@@ -55,14 +56,18 @@ public function defaultBody(): array
5556 {
5657 $ body = [];
5758
58- if (filled ($ this ->title )) {
59- $ body = Arr::add (array: $ body , key: 'title ' , value: $ this ->title );
60- }
61-
6259 if (filled ($ this ->text )) {
6360 $ body = Arr::add (array: $ body , key: 'text ' , value: $ this ->text );
6461 }
6562
63+ if (filled ($ this ->html )) {
64+ $ body = Arr::add (array: $ body , key: 'html ' , value: $ this ->html );
65+ }
66+
67+ if (filled ($ this ->title )) {
68+ $ body = Arr::add (array: $ body , key: 'title ' , value: $ this ->title );
69+ }
70+
6671 $ labels = $ this ->labels ;
6772
6873 if ($ labels instanceof Collection) {
0 commit comments