github/hubot — pull request #310 by ejfinneran (2012-06-28 01:16:49+00:00)
Title: Fix for bug with Hubot sending messages to the wrong room

This fixes an issue identified in #275 where if Hubot joined multiple rooms, userForId
would return the user object with the room attribute from the first
message as persisted by Redis so the each subsequent message would always get sent to the room from the first message.

Since the adapter only cares about the room the user belongs to, we can
just construct an object that provides that information rather than
polluting robot.brain with a fake user object via userForId

Tested this with XMPP, Campfire and IRC adapters.