-
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
Open URL in same tab and not new window #984
Comments
Currently, |
@compulim you are right "Currently, openUrl will open in new window (using window.open)" but I want to open url into current tab/page of browser this is a query. Its like enhancement into WebChat. |
I am looking for this feature too. If you want your chatbot to help you with page navigation by links this is a necessary feature. Opening in a new tab will destroy the navigation workflow. |
I'm trying to solve this myself. Is there any way that if the chat opens in several tabs within the same browser, keep the conversationID? |
Thanks everyone. I have added this as a planning item for customizability, we are planning some big works over there @serpino you will need to look inside |
I have been able to solve it by keeping the conversationID in a localstorage when it is a new conversation. Thank you |
@serpino Can you please provide some code for doing that? |
@Snekha-Shivakumar I detail it step by step This is the one we will use to see if it is a new connection or we must retrieve the messages for that conversation. The first thing you should do is check if there is any cookie or localstorage with that conversartionID
In case of not existing, you create the botchat object and with the following function and the conversationID that is generated, you create the localstorage
If it exists, you must create the botchat object with the conversationID that you had saved in the localstorage. This is what you are going to do is retrieve the chat messages for that ID, so when you change the tab you will have them. With this conversationID you must make a request as explained in the following link, and you will receive the necessary parameters to create the botchat object |
Related to #368, please refer to that issue for tracking. |
https://github.com/Microsoft/BotFramework-WebChat/blob/617de0a0145aef1f2843c72d7ec4e6818c0bf7fb/src/Chat.tsx#L321
The text was updated successfully, but these errors were encountered: