You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We found that if we use a bot created using Bot Framework Composer in Web Chat control using DirectLine channel, the greeting is displayed twice. The second time is after user sends first message to the bot. The reason is clear, is related to the double event OnConversationUpdateActivity that is fired when the conversation between bot and user starts, the first when bot is added to conversation and the second when is added the user.
We know that it is a "knowed problem" on BotFramework with directline that is solved in most of templates with this two lines of code:
foreach (var member in membersAdded)
if (member.Id != turnContext.Activity.Recipient.Id)
Describe the solution you'd like
I'd like that Bot Framework Composer editor Greeting works by default like in DialogAndWelcome Bot example of Bot Framework SDK 4.
Describe alternatives you've considered
Our first try was to use a distinct value on: OnConversationUpdateActivity.condition
toLower(turn.Activity.membersAdded[0].name) != 'bot'
->
substring(toLower(turn.Activity.membersAdded[0].name), 0, 3) != 'bot'
Because we detect that name is not always "bot" in our case was "bot-xxxx..."
But it seems that condition on OnConversationUpdateActivity is not really working: we print the condition on message to user and it send 'True' and 'False' but is showing twice.
We found a workarround following this steps:
· blank trigger OnConversationUpdateActivity condition (because is not working)
· adding "Loop: for each item" with itemsProperty = turn.Activity.membersAdded
· adding a "Branch: if/else" with condition = string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)
· Send welcome message only if condition is True
This workarround fixes the bug and we think is the equivalent to Bot Framework standard Welcome Bot:
foreach (var member in membersAdded)
if (member.Id != turnContext.Activity.Recipient.Id)
· We use IDs instead of Names.
· Foreach is better than single condition, because we thinks this will work on other channels with more than user at conversation with the bot like in Teams.
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We found that if we use a bot created using Bot Framework Composer in Web Chat control using DirectLine channel, the greeting is displayed twice. The second time is after user sends first message to the bot. The reason is clear, is related to the double event OnConversationUpdateActivity that is fired when the conversation between bot and user starts, the first when bot is added to conversation and the second when is added the user.
We know that it is a "knowed problem" on BotFramework with directline that is solved in most of templates with this two lines of code:
foreach (var member in membersAdded)
if (member.Id != turnContext.Activity.Recipient.Id)
Describe the solution you'd like
I'd like that Bot Framework Composer editor Greeting works by default like in DialogAndWelcome Bot example of Bot Framework SDK 4.
Describe alternatives you've considered
Our first try was to use a distinct value on:
OnConversationUpdateActivity.condition
toLower(turn.Activity.membersAdded[0].name) != 'bot'
->
substring(toLower(turn.Activity.membersAdded[0].name), 0, 3) != 'bot'
Because we detect that name is not always "bot" in our case was "bot-xxxx..."
But it seems that condition on OnConversationUpdateActivity is not really working: we print the condition on message to user and it send 'True' and 'False' but is showing twice.
We found a workarround following this steps:
This workarround fixes the bug and we think is the equivalent to Bot Framework standard Welcome Bot:
foreach (var member in membersAdded)
if (member.Id != turnContext.Activity.Recipient.Id)
· We use IDs instead of Names.
· Foreach is better than single condition, because we thinks this will work on other channels with more than user at conversation with the bot like in Teams.
Additional context
The text was updated successfully, but these errors were encountered: