microsoft / microsoft/BotFramework-WebChat
createDirectLineSpeechAdapter 'userID' prop overwrites internal value, should be inaccessible
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 1.6k
- Avg merge
- 22h 58m
- Merged PRs (30d)
- 2
Description
Screenshots
'userID' not passed in as property

'userID' passed in as property
const adapters = await window.WebChat.createDirectLineSpeechAdapters( {
fetchCredentials,
userID: 'dl_abc123'
} );

Version
CDN v4.10.1
Describe the bug
createAdapter.js exports the create() function which includes the userID property. This property is used internally by the adapter where it is assigned a value from DL Speech which fills the recipient.from.id activity property. It is not intended to be an accessible property when implementing the createDirectLineSpeechAdapters() method. In support of this, a console message is displayed in the browser indicating userID (and username) are not supported.
If the property is passed into createDirectLineSpeechAdapters(), which utilizes the create() function, the passed in property value overwrites the value internally assigned by DL Speech.
Steps to reproduce
- Open Web Chat using DL Speech
- Pass
userIDinto thecreateDirectLineSpeechAdapters() - By logging the activity, observe the
recipient.from.idvalue has been overwritten
Expected behavior
recipient.from.id property in activity should maintain value assigned by DL Speech.
[Bug]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with createAdapter.js and trace how createDirectLineSpeechAdapters() passes the userID property into the adapter. Reproduce the issue with DirectLine Speech by passing userID, then inspect the logged activity and verify that recipient.from.id remains the value assigned by DirectLine Speech.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100