praekelt/vumi-jssandbox-toolkit — pull request #177 by justinvdm (2014-04-11 10:17:01+00:00)
Title: Another state transition bug

I think there is still a state transition bug. Currently on we calculated ``resumed`` by doing:
```python
var resumed = self.user.state.name === new_state.name;
```
(see https://github.com/praekelt/vumi-jssandbox-toolkit/blob/develop/lib/interaction_machine.js#L477)

but ``set_next_state`` does

```python
if (typeof next != 'undefined' && next !== null) {
return self.im.user.state.reset(next);
}
```

(see https://github.com/praekelt/vumi-jssandbox-toolkit/blob/develop/lib/states/state.js#L287-L289)

This means that by the time ``resumed`` is calculated, states entered from another state have already been set on the user so ``resumed`` is always true here?