botfront / rasa-webchat

A feature-rich chat widget for Rasa and Botfront
https://botfront.io/rasa
Apache License 2.0
948 stars 496 forks source link

Webchat does not update when metadata is added to bot response in Rasa #389

Closed jenna-ariga closed 3 years ago

jenna-ariga commented 3 years ago

If you're using Botfront, you can directly change this parameter in your bot response settings. If you're not using Botfront however, you can pass this setting in your bot response, add a metadata property, with the property linkTarget which can either be set to _blank or _self.

Originally posted by @MatthieuJnon in https://github.com/botfront/rasa-webchat/issues/231#issuecomment-667164493

Hello! Pardon me, I am new to Rasa. Previously I saw a post regarding the same issue, and I am trying to get the link to open in the same tab in my website. I am using Rasa Open source and the javascript snippet for the rasa-webchat in my base.html. This is what I added in mydomain.yml file under bot response:

utter_link:
- metadata: 
     linkTarget: _self 
  text: "Here is the [link](http://mysite.com/another-page)"

Afterwards, I used rasa train in the command line to train the model. However, after I restart the rasa server to load the new model, in the webchat when I click the link displayed, it continues to open in a new tab. May I check if I am doing anything wrong?

stale[bot] commented 3 years ago

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.