   message: (message) =>
     {text, user, channel, subtype, topic, bot} = message
 
+    subtype = subtype || 'message'
+
     # Hubot expects this format for TextMessage Listener
     bot.room = channel.id if bot
     user.room = channel.id if user
+    user = {
+      room: channel.id
+    } if !user && !bot
 
     # Direct messages
     if channel.id[0] is 'D'

        @receive new TopicMessage user, message.topic, message.ts

      else        
        @robot.logger.debug "Received message: '#{text}' in channel: #{channel.name}, from: #{user.name}"
        @receive new TextMessage(user, text, message.ts)




{Adapter, TextMessage, EnterMessage, LeaveMessage, TopicMessage, Message, CatchAllMessage} = require.main.require 'hubot'

SlackClient = require './client'

