         return null
 
     _chunkMessage: (msg) ->
+        if not msg  
+            return ['']
         message_length = new TextEncoder.TextEncoder('utf-8').encode(msg).length
         message_limit = messageMaxRunes
         chunks = []

            # check if channel in other direction exists
            channel = userID + "__" + @self.id
            channel = @findChannelByName(channel)
            if !channel
                # channel obviously doesn't exist, let's create it
                channel = @createDirectChannel(userID)
                if !channel
                    if callback? then callback(null)
        if callback? then callback(channel)

    getAllChannels: ->
        @channels

            create_at: Date.now()
            user_id: @self.id
            channel_id: channelID

        if typeof msg is 'string'
          postData.message = msg
        else
          postData.message = msg.message
          if msg.props
            postData.props = msg.props

        console.log '=======postMessage data =======' + JSON.stringify postData

        # break apart long messages
        chunks = @_chunkMessage(postData.message)
