Skip to content

Commit 75bda82

Browse files
committed
Adds broadcast toogle to chat.postmessage
1 parent 1f619d5 commit 75bda82

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

source/src/Slackbot.Net.SlackClients.Http/Models/Requests/ChatPostMessage/ChatPostMessageRequest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public class ChatPostMessageRequest
1717
public Attachment[] attachments { get; set; }
1818

1919
public IBlock[] Blocks { get; set; }
20+
public bool? Reply_Broadcast { get; set; }
2021
}
2122

2223
public class Attachment

source/test/Slackbot.Net.SlackClients.Http.Tests/ChatPostMessageTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ public async Task PostWorks()
3232
var response = await SlackClient.ChatPostMessage(msg);
3333
Assert.True(response.Ok);
3434
}
35+
36+
[Fact]
37+
public async Task PostWithBroadCastWorks()
38+
{
39+
var msg = new ChatPostMessageRequest
40+
{
41+
Channel = "CTECR3J6M",
42+
thread_ts = "1679186947.684479",
43+
Text = "BROADCAST!",
44+
Reply_Broadcast = true
45+
};
46+
var response = await SlackClient.ChatPostMessage(msg);
47+
Assert.True(response.Ok);
48+
}
3549

3650
[Theory]
3751
[InlineData(true)]

0 commit comments

Comments
 (0)