notification bot
2 TopicsNot receiving missed activity email for the messages received from the bot in Teams personal chat
I have enabled MS Teams notification Settings to receive email for the missed activity (unread messages in personal chat). I set my status as offline and logged out from all the devices and browser. Cleared browser cache. I received an email for the message sent by one of my colleagues in the personal chat (Refer to the attached screenshot below). Around the same time, I received a message in personal chat from the bot installed in personal scope and team scope (available in the Teams app store). However, I did not receive a missed activity email for the message received from the bot. How do I enable missed activity emails for the bot messages sent in the personal chat?280Views0likes2CommentsNotification bot create card then add reply to that card
namespace MyTeamsApp5.Controllers { [Route("api/notification")] [ApiController] public class NotificationController : ControllerBase { private readonly ConversationBot _conversation; private readonly string _adaptiveCardFilePath = Path.Combine(".", "Resources", "NotificationDefault.json"); public NotificationController(ConversationBot conversation) { this._conversation = conversation; } [HttpPost] public async Task<ActionResult> PostAsync(CancellationToken cancellationToken = default) { // Read adaptive card template var cardTemplate = await System.IO.File.ReadAllTextAsync(_adaptiveCardFilePath, cancellationToken); var pageSize = 100; string continuationToken = null; do { var pagedInstallations = await _conversation.Notification.GetPagedInstallationsAsync(pageSize, continuationToken, cancellationToken); continuationToken = pagedInstallations.ContinuationToken; var installations = pagedInstallations.Data; foreach (var installation in installations.Where(o => o.Type == NotificationTargetType.Channel)) { // Build and send adaptive card var cardContent = new AdaptiveCardTemplate(cardTemplate).Expand ( new NotificationDefaultModel { Title = "New Event Occurred!", AppName = "Contoso App Notification", Description = $"This is a sample http-triggered notification to {installation.Type}", NotificationUrl = "https://aka.ms/teamsfx-notification-new", } ); var messageResponse = await installation.SendAdaptiveCard(JsonConvert.DeserializeObject(cardContent), cancellationToken); if (messageResponse != null) { var mentionActivity = MessageFactory.Text($"this is a reply."); mentionActivity.ReplyToId = messageResponse.Id; await installation.Adapter.ContinueConversationAsync( installation.BotAppId, installation.ConversationReference, async (turnContext, cancellationToken) => { turnContext.Activity.ReplyToId = messageResponse.Id; await turnContext.SendActivityAsync(mentionActivity, cancellationToken); }, cancellationToken); } } } while (!string.IsNullOrEmpty(continuationToken)); return Ok(); } } } So I'm trying to create a notification bot for a ticket system. Where when the notification bot is called, it posts the ticket card to the channel , then posts a reply to this card with a message. However the above code creates new threads for each message and not a response for the second one. I think it's related to the turnContext not being the same maybe, so I'm not sure if it's actually possible. Any help would be great.71Views0likes1Comment