evantahler/actionhero — pull request #377 by evantahler (2014-05-09 06:47:03+00:00)
Title: [HOLD] Chat Updates

# Chat Updates

*This PR will become actionHero release 9.0.0*

- [x] allows clients to be in more than one room at a time
- [x] removes the notion of 'listening' to rooms in favor of being present within multiple rooms
- [x] ability to re-authenticate connections within a room
- [ ] ability to modify the attributes of a connection on a remove actionhero node
- [ ] ability to force the re-authentication of all clients within a room
- [ ] tests for the above

## notes

**connection object**

- `connection.room` replaced with `connection.rooms = []`
- the verb `roomChange` has been replaced with `roomAdd`
- the verb `listenToRoom` is removed
- the verb `silenceRoom` is removed
- when talking within a chat room via `say`, the `room` must also be provided
- websocket: `client.say(room, message)`
- socket: `say myRoom hello word`

**chatRoom**

- new method: `api.chatRoom.reAuthenticate(connectionId, callback)` will re-auth the connection in every room it is present within
- `api.chatRoom.addMember` is now `function(connectionId, room, callback)`
- `connectionId` can be a connection on a remote server
- `api.chatRoom.removeMember` is now `function(connectionId, room, callback)`
- `connectionId` can be a connection on a remote server