Keep conversationId and userID when opening chat in new tab
Bot Info
- SDK Platform: .NET Core
- SDK Version: Core
- Active Channels: WebChat, DirectLine
- Deployment Environment: Azure Bot Service, Azure App Service, Bot Emulator
Issue Description
I want to host the chat within our website. In this web there are links that open the web in another tab. When I open the chat in a new tab, I receive in the message type conversationUpdate, a different conversationID and userID, when in fact it is the same user following the same conversation.
Is there any way that if that chat opens in different tabs of the browser is considered the same conversation?
P.D: I'm integrating the chat with directLine so I can customize the css and js files if necessary. Thanks!
Hi. Can you help me please?
Thanks
Preservation and continuation of history is not quite working today. We are planning to make it a feature in coming milestone.
In the meanwhile, I think you need to manipulate the DirectLineJS object to achieve that. Instead of passing a botConnection into Web Chat, you pass a directLine object in.
I have some old code trying to explore the area, may be it is helpful for you.
directLine={{
conversationId: this.state.conversationID,
domain: 'http://localhost:3001/mock',
secret: null,
streamUrl: this.state.conversationID ? 'http://nostreamsupport' : null,
token: this.state.conversationID ? 'null' : null,
watermark: this.state.watermark,
webSocket: false
}}
Related to https://github.com/Microsoft/BotFramework-WebChat/issues/365, please refer to that issue for tracking. :)