translating kalasoo/meteor-chat from coffeescript to javascript