Add a connection (via id) to a room. Throws errors if the room does not exist, or the connection is already in the room. Middleware errors also throw.
Add a middleware component to connection handling.
Send a message to all clients connected to this room
{} for a mockRemove an existing chat room. All connections in the room will be removed. Throws an error if the room does not exist.
Check if a room exists.
An overwrite-able method which configures what properties of connections in a room are initially stored about a connection when added via api.chatRoom.addMember
List all chat rooms created
Remote a connection (via id) from a room. Throws errors if the room does not exist, or the connection is not in the room. Middleware errors also throw. toWaitRemote: Should this method wait until the remote Actionhero server (the one the connection is connected too) responds?
Learn about the connections in the room.
Returns a hash of the form { room: room, members: cleanedMembers, membersCount: count }. Members is an array of connections in the room sanitized via api.chatRoom.sanitizeMemberDetails
Configures what properties of connections in a room to return via api.chatRoom.roomStatus
Generated using TypeDoc
Add a new chat room. Throws an error if the room already exists.