@@ -1447,10 +1447,11 @@ public static FormBody.Builder toForm(ChannelsUnarchiveRequest req) {
14471447 return form ;
14481448 }
14491449
1450- public static FormBody .Builder toForm (ChatGetPermalinkRequest req ) {
1450+ public static FormBody .Builder toForm (ChatAppendStreamRequest req ) {
14511451 FormBody .Builder form = new FormBody .Builder ();
14521452 setIfNotNull ("channel" , req .getChannel (), form );
1453- setIfNotNull ("message_ts" , req .getMessageTs (), form );
1453+ setIfNotNull ("ts" , req .getTs (), form );
1454+ setIfNotNull ("markdown_text" , req .getMarkdownText (), form );
14541455 return form ;
14551456 }
14561457
@@ -1470,6 +1471,13 @@ public static FormBody.Builder toForm(ChatDeleteScheduledMessageRequest req) {
14701471 return form ;
14711472 }
14721473
1474+ public static FormBody .Builder toForm (ChatGetPermalinkRequest req ) {
1475+ FormBody .Builder form = new FormBody .Builder ();
1476+ setIfNotNull ("channel" , req .getChannel (), form );
1477+ setIfNotNull ("message_ts" , req .getMessageTs (), form );
1478+ return form ;
1479+ }
1480+
14731481 public static FormBody .Builder toForm (ChatMeMessageRequest req ) {
14741482 FormBody .Builder form = new FormBody .Builder ();
14751483 setIfNotNull ("channel" , req .getChannel (), form );
@@ -1619,6 +1627,40 @@ public static FormBody.Builder toForm(ChatPostMessageRequest req) {
16191627 return form ;
16201628 }
16211629
1630+ public static FormBody .Builder toForm (ChatStartStreamRequest req ) {
1631+ FormBody .Builder form = new FormBody .Builder ();
1632+ setIfNotNull ("channel" , req .getChannel (), form );
1633+ setIfNotNull ("thread_ts" , req .getThreadTs (), form );
1634+ setIfNotNull ("markdown_text" , req .getMarkdownText (), form );
1635+ setIfNotNull ("recipient_user_id" , req .getRecipientUserId (), form );
1636+ setIfNotNull ("recipient_team_id" , req .getRecipientTeamId (), form );
1637+ return form ;
1638+ }
1639+
1640+ public static FormBody .Builder toForm (ChatStopStreamRequest req ) {
1641+ FormBody .Builder form = new FormBody .Builder ();
1642+ setIfNotNull ("channel" , req .getChannel (), form );
1643+ setIfNotNull ("ts" , req .getTs (), form );
1644+ setIfNotNull ("markdown_text" , req .getMarkdownText (), form );
1645+
1646+ if (req .getMetadataAsString () != null ) {
1647+ form .add ("metadata" , req .getMetadataAsString ());
1648+ } else if (req .getMetadata () != null ) {
1649+ String json = GSON .toJson (req .getMetadata ());
1650+ form .add ("metadata" , json );
1651+ }
1652+ if (req .getBlocksAsString () != null ) {
1653+ form .add ("blocks" , req .getBlocksAsString ());
1654+ } else if (req .getBlocks () != null ) {
1655+ String json = getJsonWithGsonAnonymInnerClassHandling (req .getBlocks ());
1656+ form .add ("blocks" , json );
1657+ }
1658+ if (req .getBlocksAsString () != null && req .getBlocks () != null ) {
1659+ log .warn ("Although you set both blocksAsString and blocks, only blocksAsString was used." );
1660+ }
1661+ return form ;
1662+ }
1663+
16221664 public static FormBody .Builder toForm (ChatUpdateRequest req ) {
16231665 warnIfEitherTextOrAttachmentFallbackIsMissing (
16241666 "chat.update" ,
0 commit comments