Botfuel / botfuel-dialog

Botfuel SDK to build highly conversational chatbots
https://docs.botfuel.io
Other
102 stars 18 forks source link

feat: Allow to add aliases for dialogs #271

Open QuentinFarizon opened 5 years ago

QuentinFarizon commented 5 years ago

Allow to have "dialog aliases" that act like "url rewrite" on the web; with the same purpose : allowing to rename a dialog without breaking for users that still have messages with postbacks configured to point on the old dialog name.

This is configured on the config file, with :

{
adapter: {
    name: 'my-adapter'
  },
  dialogAliases: {
    'my-old-dialog-name': 'my-new-dialog-name'
  }
}
yangeorget commented 5 years ago

In the execute method of the OldDialog, your could triggerNext the NewDialog... what about this?

QuentinFarizon commented 5 years ago

Yes, it would work, we didn't think of that. Do you think that makes this configuration proposition useless ?

What would you think of renaming my configuration autoTriggerNext or something like that, regarding the fact that it would replace the boilerplate of having an empty dialog with just a triggerNext call ?