Wrap websocket connect message in on connect handler
Extracted functionality into mailroom.js