scalableminds / chatroom

React-based Chatroom Component for Rasa Stack
https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/demo.html
GNU Affero General Public License v3.0
307 stars 208 forks source link

Do not delete session history when reloading page #131

Open khalo-sa opened 4 years ago

khalo-sa commented 4 years ago

Hi,

is it possible to keep the chat history of a session visible after a page reload? In my case, the chat window becomes completely blank if I had a conversation with the bot, and then reload the page.

Thank you!

hotzenklotz commented 4 years ago

No, unfortunately session recovery is not yet implemented in the Chatroom. It can be done though, using the Rasa Tracker API . See https://rasa.com/docs/rasa/api/http-api/#operation/getConversationTracker

The chat history is not available as part of the regular Rasa REST channel and therefore we can not easily recover the session. However, it is possible to fetch the tracker for a conversation and restore the history from the events. This requires some more effort though. See the API above.

digitalWestie commented 4 years ago

Hey, I just submitted a PR for this, but my fork is based off @rasaHQ's fork.

Still, it might be helpful: https://github.com/RasaHQ/chatroom/pull/2