Modify the Server::getMessages() API

Modified the Server::getMessages() API to make it always return an array, instead of returning false when there are no messages.