 
   messageReceived: (message) ->
     @messages.push message
+    message.channel = @name
     @view.newMessage message
 
 class ChatView extends KDView


    view = @getOptions().view
    channelPaneInstance = view.addChannelTab name
    channelName = "client-#{name}"

    channel = new Channel 

    @channels[name] = channel

  parseMessageForChannels: (message) ->
    topicExp = /#([\w-]+)/g
    while match = topicExp.exec message
      channelName = match[1]
      channel = @joinChannel channelName
