from . import connection as cn

from . import room

class ChatRoom(room.Room):
    """
    A chat room allows you to talk and process chats from the room.
    """

    def __init__(self, roomname, password=None, attempts=None):
        super().__init__(roomname, password, attempts)

        self.connection.add_callback(cn.PTYPE["EVENT"]["SEND"],
                                                self.handle_message)

    def handle_message(self, message):
        """
        handle_message(message) -> None

        Pipes the message onto handle_chat()
        """

        self.handle_chat(message["data"])

    def handle_chat(self, message):
        """
        handle_chat(message) -> None

        Override this method to handle chats.
        """

        pass

    def send_chat(self, message, parent=""):
        """
        send_chat(message, parent="") -> None

        Send a message out to the world!
        """

        self.connection.send_packet(cn.PTYPE["COMMAND"]["SEND"],
                                cn.build_json(content=message, parent=parent))

@@ -913,32 +913,68 @@
 d!%0A        %22%22%22%0A%0A
+        if message is not None:%0A    
         self.con

Will not send message if message is None.