botkit-cms
botkit-cms copied to clipboard
`controller.studio.runTrigger` should resolve promise regardless of whether a trigger was matched
While working with the cms locally, using useLocalStudio = true
, evaluateTrigger
doesn't exactly behave the way it should. In the case where no trigger was matched, the promise is rejected (which it should resolve to mimic the functionality of CMS run as remote API service)
https://github.com/howdyai/botkit-cms/blob/a98c9b8b1e033f90d2f2682b4612ec2018b4d8db/src/api.js#L252
When run as an API service, evaluateTrigger
always resolves, even when there was no match. This in turn affects the Promise object returned by runTrigger
Also have a look at https://github.com/howdyai/botkit/commit/ef69730558cefdc90156387f685b55467b45c9b0
Interesting point! I'll take a look.