tinyspeck/hubot-slack — pull request #63 by smashwilson (2014-07-17 13:41:28+00:00)
Title: Preserve user data when switching rooms

I noticed that roles assigned with `auth.coffee` were being reset if a user spoke in a different room. After doing some digging, it seems that it's a consequence of [these lines in hubot's brain](https://github.com/github/hubot/blob/39681ea35de6375154748418e11f533ef51c3340/src/brain.coffee#L109-L111) that recreate `User` objects if a different `room` is present in the "options" argument. The simple fix is not to assign a `room` on the user object until after the `userForId` call.

It looks like this had been fixed before in 79f559, but #45 reverted part of it to get the tests green again! This should re-fix the root cause *and* update the tests to pass.