3) Get original user ID by re-running step 1. Result for me on PR 1.5.15 (as of commit fc748518c12ff5ee68ac8047a69932c76c69b397) -- both during unit testing, and testing via the web UI -- is that the returned user ID is the string seen in step 1, rather than the "foo@bar.com" seen in step 2.
Given PurpleRobot.setUserId() takes 1 parameter, a string for the new user ID (via: https://github.com/cbitstech/Purple-Robot/wiki/JavaScript-API#purplerobotlaunchapplicationapplicationnamestring-launchparamsobject-scriptstring)...
Repro:
1) Get existing user ID:
2) Change it:
3) Get original user ID by re-running step 1. Result for me on PR 1.5.15 (as of commit fc748518c12ff5ee68ac8047a69932c76c69b397) -- both during unit testing, and testing via the web UI -- is that the returned user ID is the string seen in step 1, rather than the "foo@bar.com" seen in step 2.