Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7a92aaf
Add hierarchical Teams API facade to TeamsBotApplication
rido-min Feb 17, 2026
ce1a868
Add TeamsApi REST endpoint mapping to README
rido-min Feb 17, 2026
0ce027b
Add API for adding/removing reactions to messages
rido-min Feb 18, 2026
31731d8
Merge branch 'next/core' into next/core-api-clients
rido-min Mar 4, 2026
b8e3cae
Expand Teams SDK: strong-typed invokes, events, refactoring
rido-min Mar 4, 2026
4a720ff
Add null checks and refactor config/service resolution
rido-min Mar 4, 2026
60f210e
fix slnx
rido-min Mar 4, 2026
97015ec
Add Reactions and TargetedMessage support to Core (#338)
rido-min Mar 4, 2026
c5e9025
Update tests for changes to Recipient property handling
rido-min Mar 4, 2026
27e0058
Refactor Conversation ctor, improve test coverage & reactions
rido-min Mar 4, 2026
4cf5f8f
Integrate xUnit logging into test project
rido-min Mar 4, 2026
83a0491
Add Teams message reaction logic and service URL overload
rido-min Mar 4, 2026
d0fa89a
Refactor test infra: logging, env vars, and code cleanup
rido-min Mar 4, 2026
d70704c
Add agentic app/user fields to CompatTeamsInfoTests
rido-min Mar 4, 2026
5e1187a
Refactor Teams bot hosting & middleware for ASP.NET Core
rido-min Mar 4, 2026
a4e0914
Update JSON serialization and logging in ConversationClient
rido-min Mar 4, 2026
3f4d38d
Add agentic identity support to Teams API integration tests
rido-min Mar 5, 2026
c7664c4
tm not working
rido-min Mar 5, 2026
74f3a26
Mark and serialize targeted messages in activity payloads
rido-min Mar 5, 2026
f03fc62
Include isTargeted in activity JSON serialization
rido-min Mar 5, 2026
16255ec
Merge branch 'next/core' into next/core-api-clients
rido-min Mar 18, 2026
4cb7cf7
Refactor targeted message handling and API support
rido-min Mar 18, 2026
1434690
Add new message handlers and task module demo
rido-min Mar 18, 2026
1d36d4a
Refactor APIs: remove overloads, tighten validation
rido-min Mar 18, 2026
17a7c98
Update TeamsApiFacade and CoreActivityBuilder tests
rido-min Mar 18, 2026
33209d5
Enhance Teams APIs and targeted messaging support
rido-min Mar 18, 2026
98e21b8
Update GetByIdAsync to return TeamsConversationAccount
rido-min Mar 18, 2026
01758d7
Update IsTargeted handling and improve react message flow
rido-min Mar 18, 2026
09b221a
Merge branch 'next/core' into next/core-api-clients
rido-min Mar 18, 2026
6b46025
Merge branch 'next/core' into next/core-api-clients
rido-min Mar 18, 2026
9f20b7c
Update EchoBot to require TeamsBotApplication in ctor
rido-min Mar 18, 2026
f9225f8
Refactor ReactionsApi to use activity context
rido-min Mar 18, 2026
f64177d
Remove permissions section from settings.local.json
rido-min Mar 19, 2026
4eee07c
Refactor for null safety, URI encoding, and code clarity
rido-min Mar 19, 2026
9dca4e0
Add AgenticIdentity support for targeted activity updates
rido-min Mar 19, 2026
5b30078
Make agenticIdentity optional in UpdateTargetedActivityAsync
rido-min Mar 19, 2026
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ appsettings.Local.json
appsettings.Development.json
launchsettings.json

.claude/

# User-specific files
*.rsuser
*.suo
Expand Down
8 changes: 0 additions & 8 deletions core/.claude/settings.local.json

This file was deleted.

4 changes: 3 additions & 1 deletion core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
launchSettings.json
appsettings.Development.json
*.runsettings
.claude/


# Web build output and dependencies
**/Web/bin/
**/Web/node_modules/
**/Web/node_modules/
66 changes: 56 additions & 10 deletions core/samples/CompatBot/EchoBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Teams.Bot.Apps;
Comment thread
rido-min marked this conversation as resolved.
using Microsoft.Teams.Bot.Apps.Schema;
using Microsoft.Teams.Bot.Compat;
using Microsoft.Teams.Bot.Core;
using Microsoft.Teams.Bot.Core.Schema;
using Newtonsoft.Json.Linq;

Expand All @@ -20,7 +19,7 @@ public class ConversationData

}

internal class EchoBot(ConversationState conversationState, ILogger<EchoBot> logger)
internal class EchoBot(TeamsBotApplication teamsBotApp, ConversationState conversationState, ILogger<EchoBot> logger)
: TeamsActivityHandler
{
public override async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default)
Expand All @@ -36,15 +35,62 @@ protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivi
ConversationData conversationData = await conversationStateAccessors.GetAsync(turnContext, () => new ConversationData(), cancellationToken);

string replyText = $"Echo from BF Compat [{conversationData.MessageCount++}]: {turnContext.Activity.Text}";
await turnContext.SendActivityAsync(MessageFactory.Text(replyText, replyText), cancellationToken);
await turnContext.SendActivityAsync(MessageFactory.Text($"Send a proactive message `/api/notify/{turnContext.Activity.Conversation.Id}`"), cancellationToken);

// TeamsAPXClient provides Teams-specific operations like:
// - FetchTeamDetailsAsync, FetchChannelListAsync
// - FetchMeetingInfoAsync, FetchParticipantAsync, SendMeetingNotificationAsync
// - Batch messaging: SendMessageToListOfUsersAsync, SendMessageToAllUsersInTenantAsync, etc.

await SendUpdateDeleteActivityAsync(turnContext, cancellationToken);
var act = MessageFactory.Text(replyText, replyText);
act.Recipient = new ChannelAccount();
act.Recipient.Properties.Add("isTargeted", true);
await turnContext.SendActivityAsync(act, cancellationToken);

// await turnContext.SendActivityAsync(MessageFactory.Text($"Send a proactive message `/api/notify/{turnContext.Activity.Conversation.Id}`"), cancellationToken);

var incomingCoreActivity = ((Activity)turnContext.Activity).FromCompatActivity();
TeamsActivity tm = TeamsActivity.CreateBuilder()
.WithConversation(new Conversation { Id = incomingCoreActivity.Conversation?.Id! })
.WithText("Hello TM !")
.WithRecipient(incomingCoreActivity.From, true)
.WithFrom(incomingCoreActivity.Recipient)
//.WithServiceUrl(activity.ServiceUrl!)
.WithServiceUrl("https://pilot1.botapi.skype.com/amer/9a9b49fd-1dc5-4217-88b3-ecf855e91b0e/")
.Build();

await teamsBotApp.ConversationClient.SendActivityAsync(tm, cancellationToken: cancellationToken);

var res = await turnContext.SendActivityAsync(
MessageFactory.Text("I'm going to add and remove reactions to this message."), cancellationToken);

await Task.Delay(500, cancellationToken);

await teamsBotApp.ConversationClient.AddReactionAsync(
turnContext.Activity.Conversation.Id,
res.Id,
"laugh",
new Uri("https://pilot1.botapi.skype.com/amer/9a9b49fd-1dc5-4217-88b3-ecf855e91b0e/"),
//incomingCoreActivity.ServiceUrl!,
AgenticIdentity.FromProperties(incomingCoreActivity.Recipient?.Properties),
null,
cancellationToken);

await Task.Delay(500, cancellationToken);
await teamsBotApp.ConversationClient.AddReactionAsync(
turnContext.Activity.Conversation.Id,
res.Id,
"sad",
incomingCoreActivity.ServiceUrl!,
AgenticIdentity.FromProperties(incomingCoreActivity.Recipient?.Properties),
null,
cancellationToken);

await Task.Delay(500, cancellationToken);

await teamsBotApp.ConversationClient.DeleteReactionAsync(
turnContext.Activity.Conversation.Id,
res.Id,
"laugh",
//new Uri("https://pilot1.botapi.skype.com/amer/9a9b49fd-1dc5-4217-88b3-ecf855e91b0e/"),
incomingCoreActivity.ServiceUrl!,
AgenticIdentity.FromProperties(incomingCoreActivity.Recipient?.Properties),
null,
cancellationToken);

Attachment attachment = new()
{
Expand Down
2 changes: 1 addition & 1 deletion core/samples/PABot/RoutedTokenAcquisitionService.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft.Extensions.Options;
using Microsoft.Identity.Abstractions;
using Microsoft.Identity.Web;
using Microsoft.Extensions.Options;
using Microsoft.Teams.Bot.Core.Schema;

namespace PABot
Expand Down
83 changes: 83 additions & 0 deletions core/samples/TeamsBot/Cards.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,89 @@ internal class Cards
}
};

public static readonly object TaskModuleLauncherCard = new JsonObject
{
["type"] = "AdaptiveCard",
["version"] = "1.4",
["body"] = new JsonArray
{
new JsonObject
{
["type"] = "TextBlock",
["text"] = "Task Module Demo",
["weight"] = "Bolder",
["size"] = "Medium"
},
new JsonObject
{
["type"] = "TextBlock",
["text"] = "Click the button below to open a task module dialog.",
["wrap"] = true
}
},
["actions"] = new JsonArray
{
new JsonObject
{
["type"] = "Action.Submit",
["title"] = "Open Task Module",
["data"] = new JsonObject
{
["msteams"] = new JsonObject
{
["type"] = "task/fetch"
}
}
}
}
};

public static readonly object TaskModuleFormCard = new JsonObject
{
["type"] = "AdaptiveCard",
["version"] = "1.4",
["body"] = new JsonArray
{
new JsonObject
{
["type"] = "TextBlock",
["text"] = "Enter your details:",
["weight"] = "Bolder",
["size"] = "Medium"
},
new JsonObject
{
["type"] = "Input.Text",
["id"] = "userName",
["label"] = "Name",
["placeholder"] = "Enter your name"
},
new JsonObject
{
["type"] = "Input.Text",
["id"] = "userComment",
["label"] = "Comment",
["placeholder"] = "Enter a comment",
["isMultiline"] = true
}
},
["actions"] = new JsonArray
{
new JsonObject
{
["type"] = "Action.Submit",
["title"] = "Submit",
["data"] = new JsonObject
{
["msteams"] = new JsonObject
{
["type"] = "task/submit"
}
}
}
}
};

public static readonly object FeedbackCardObj = new JsonObject
{
["type"] = "AdaptiveCard",
Expand Down
Loading
Loading