Closed technicalpickles closed 8 years ago
I played with this in the debugger, I believe this is because this is triggering both:
robot.respond /(pager|major)( me)? incident (.*)$/i, (msg)
...
robot.respond /pager( me)? (.+) (\d+)$/i, (msg)
If I run the command over and over I do not always get the same order of the responders picking up. The former is the one that it should trigger and the latter is either too inclusive of a regex or needs to explicitly short circuit on calls that come from 'pager incident 123'.
However after implementing the suggested fix (PR #72) I cannot reproduce at all. I am still learning, could you help me understand why this would be?
Fixed with #72
I noticed this while refactoring some other things:
I think it's just a matter of doing
msg.finish()
in the incident listener.