Forums - C# Corner

Forum guidelines
Mukesh Gupta

Mukesh Gupta

  • 1.5k
  • 5
  • 68

Welcome message not visibile in Webchat,but work in Emulator

Dec 7 2017 4:16 AM
IConversationUpdateActivity update = message;
using (var scope = Microsoft.Bot.Builder.Dialogs.Internals.DialogModule.BeginLifetimeScope(Conversation.Container, message))
{
var client = scope.Resolve();
if (update.MembersAdded.Any())
{
foreach (var newMember in update.MembersAdded)
{
if (newMember.Id != message.Recipient.Id)
{
var reply = message.CreateReply();
reply.Text = $"Welcome {newMember.Name}!";
client.Conversations.ReplyToActivityAsync(reply);
}
}
}
}
 
I'm new to ChatBot development using Microsoft BotFramework.
 
I have register and deployed a simple bot that was working fine with emulator (i.e bot says welcome to my simple bot),but when i used WebChat no welcome greeting was displayed, instead when user type Hi or any text after that the greeting message is displayed.
 
had gone to various tutorial and solution but not getting the exact cause. i'm using Microsoft.Bot.Builder v3.12

Answers (1)