added check for message length (config.message.length) and started discarding surplus messages (config.message.count) on the server
bugfix, id is considered set when it's a string, and errors should be passed to callback not thrown
added a proper check for the callback function to all the Chat functions