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
{{ message }}
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
When a bot sends a message to a user from within a dialog (convo), the user value appears to be missing from the message (at least when using the botbuilder-adapter-web).
In fact, in printing out the message out for debugging purposes, this is what shows up:
{ type: 'message',
inputHint: 'acceptingInput',
suggestedActions: { actions: [ [Object], [Object] ] },
text: 'Should we resume the previous chat or start a new one?',
channelData: { quick_replies: [ [Object], [Object] ] } }
As you can see, neither the 'user' nor the 'recipient' fields are available (each of them would give us useful user information).
Needless to say, send middleware is unable to do anything useful with this information, so I believe this is actually a bug. I noticed that there are a couple of prior, related issues created by @cbouvard : #2030 and #2043. I'm hoping that #2043 can actually resolve this issue, as it stores the 'user' value in convo vars, but it is awaiting a review since September. It would be great if somebody could please verify that this is actually a bug, and also review the submitted PR in #2043 in order to fix it . Better still, it would be best to have a solution that does not depend on the bot asking the user for their name during the interaction (so that it can be stored in the convo vars), as access to the 'user' value should be a given within send middleware.
The text was updated successfully, but these errors were encountered:
Thanks for commenting on this @cbouvard ! Does this work also when the first question is being asked by the bot within the convo,, before a user's response? (that is, is the user/userid already there?). And also, have you managed to get access to this info. from within the convo.before() method?
Yes, the user info is available at the very beginning of a conversation.
In the tiny project created for testing the PR (👉 here), you can check the
behavior by adding a simple console.log in the file features/pizza.js:
convo.before('default',(convo,bot)=>{console.log('Here are the vars in convo:',convo.vars);});
And I tested it with the Bot Framework emulator, it seems to be OK:
✅ Message received "Give me some pizza, Patricia 😉" with user c3dcc333-ee7b-4518-aa08-8b93bed06e32
Here are the vars in convo: { user: 'c3dcc333-ee7b-4518-aa08-8b93bed06e32',
channel: 'f02c36a0-7dc9-11eb-9ffe-b53a872a3e35|livechat' }
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
When a bot sends a message to a user from within a dialog (convo), the user value appears to be missing from the message (at least when using the botbuilder-adapter-web).
In fact, in printing out the message out for debugging purposes, this is what shows up:
As you can see, neither the 'user' nor the 'recipient' fields are available (each of them would give us useful user information).
Needless to say, send middleware is unable to do anything useful with this information, so I believe this is actually a bug. I noticed that there are a couple of prior, related issues created by @cbouvard : #2030 and #2043. I'm hoping that #2043 can actually resolve this issue, as it stores the 'user' value in convo vars, but it is awaiting a review since September. It would be great if somebody could please verify that this is actually a bug, and also review the submitted PR in #2043 in order to fix it . Better still, it would be best to have a solution that does not depend on the bot asking the user for their name during the interaction (so that it can be stored in the convo vars), as access to the 'user' value should be a given within send middleware.
The text was updated successfully, but these errors were encountered: