Closed lee-orr closed 2 years ago
Note - upon further inspection I think #375 is a symptom of the same cause, so I'll close that issue and add the info here:
I have run into a few errors with nested object calls - where the result of any inner calls is an "Object not found" error.
Here is a minimal reproducing case:
> object wrapper javascript
return "_" + args[0] + "_";
< object
> object add_hello javascript
return "hello:" + args[0];
< object
+ works *
- <call>wrapper <star></call>
+ object not found *
- <call>wrapper <call>add_hello <star> </call></call>
Given the following case:
I'd expect, if a user said "test", the bot to respond with "hello:test". Instead, I get the response: "«call»add_hello test«/call»"
Similarly, in the following case:
I'd expect that if a user said "set test", the bot would respond with "hello:test" if I say anything that doesn't match the first branch. Instead, I get the same response as above.
Lastly, with the following case:
If the user said: "initial hello", "set test" and then "initial goodbye", I'd expect the response to "get" to be "hello:test", but it will be "goodbye:test" instead, since the call will be executed on the get, not at the set.