Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/Microsoft.Bot.Builder/Teams/TeamsInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public static async Task<Tuple<ConversationReference, string>> SendMessageToTeam
var conversationParameters = new ConversationParameters
{
IsGroup = true,
ChannelData = new { channel = new { id = teamsChannelId } },
ChannelData = new TeamsChannelData { Channel = new ChannelInfo() { Id = teamsChannelId } },
Activity = (Activity)activity,
};

Expand Down Expand Up @@ -296,7 +296,7 @@ public static async Task<Tuple<ConversationReference, string>> SendMessageToTeam
var conversationParameters = new ConversationParameters
{
IsGroup = true,
ChannelData = new { channel = new { id = teamsChannelId } },
ChannelData = new TeamsChannelData { Channel = new ChannelInfo() { Id = teamsChannelId } },
Activity = (Activity)activity,
};

Expand Down
10 changes: 5 additions & 5 deletions tests/Microsoft.Bot.Builder.Tests/Teams/TeamsInfoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public async Task TestSendMessageToTeamsChannelAsync()

// Set a special base address so then we can make sure the connector client is honoring this http client
customHttpClient.BaseAddress = baseUri;

var connectorClient = new ConnectorClient(new Uri("https://test.coffee"), MicrosoftAppCredentials.Empty, customHttpClient);

var activity = new Activity
Expand Down Expand Up @@ -100,8 +100,8 @@ public async Task TestSendMessageToTeamsChannel2Async()

var channelData = adapter.ConversationParameters.ChannelData;

var channel = channelData.GetType().GetProperty("channel").GetValue(channelData, null);
var id = channel.GetType().GetProperty("id").GetValue(channel, null);
var channel = channelData.GetType().GetProperty("Channel").GetValue(channelData, null);
var id = channel.GetType().GetProperty("Id").GetValue(channel, null);

Assert.Equal(expectedTeamsChannelId, id);
Assert.Equal(adapter.ConversationParameters.Activity, activity);
Expand Down Expand Up @@ -509,8 +509,8 @@ protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage reques
// SendMessageToThreadInTeams
else if (request.RequestUri.PathAndQuery.EndsWith("v3/conversations"))
{
var content = new JObject
{
var content = new JObject
{
new JProperty("id", "id123"),
new JProperty("serviceUrl", "https://serviceUrl/"),
new JProperty("activityId", "activityId123")
Expand Down