-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix activity without "from" #1405
Conversation
Pull Request Test Coverage Report for Build 506
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, pending nitpick CHANGELOG.md
update
@compulim @corinagum is this supposed to work in the embedded WebChat in the Azure Portal? I was seeing the role being empty for activities sent from the bot, and I was wondering whether that is a bug or not? I had the preview checkbox enabled in the webchat channel configuration. |
Also using the following HTML taken from the Full bundle sample the <!DOCTYPE html>
<html>
<body>
<div id="webchat" role="main"></div>
<script src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"></script>
<script>
window.WebChat.renderWebChat({
directLine: window.WebChat.createDirectLine({ token: 'somesecret' }),
userID: 'myusername'
}, document.getElementById('webchat'));
</script>
</body>
</html> |
This works correctly in the Bot Emulator though. |
Tracking in #1886. |
Changes
activity.from.role
"user"
iffrom.id
is user ID, otherwise,"bot"
iffrom.id
is anything otherwise,"channel"
, because eitherfrom
orfrom.id
was not defined (e.g. inConversationUpdate
activity)