       body: messageBody
       meta: {createdAt: new Date().toISOString()}
 
-    chatItem.channel = fromChannel.name if fromChannel
-
-    channelMQName = "client-#{toChannel.name}"
+    chatItem.channel = fromChannel if fromChannel?.match(TOPICREGEX)
+
+    channelMQName = "client-#{toChannel}"
     @broadcaster.emit channelMQName, JSON.stringify(chatItem)
-    chatItem.author = "me"
-    toChannel.messageReceived chatItem
+    return unless @channels[toChannel]
+    #chatItem.author = "me"
+    @channels[toChannel].messageReceived chatItem
+
+  fetchAutoCompleteForMentionField:(inputValue,blacklist,callback)->
+    bongo.api.JAccount.byRelevance inputValue,{blacklist},(err,accounts)->
+      callback accounts
 
 class Channel extends KDEventEmitter
   constructor: (options = {}, data) ->

        messages    :
          required  : "Reply field is empty..."

    @addSubView @sendButton = new KDButtonView
      title: "Send"
      cssClass: "fl"
      style: "clean-gray inside-button"
      callback: =>
        chatMsg = @input.getValue()

        @input.setValue ""
        @input.blur()
        @input.$().blur()

        @getDelegate().emit 'ChatMessageSent', chatMsg
    @template.update()

  pistachio:->
    parsedBody = @getData().body.replace(TOPICREGEX, "<a class='ttag' href='#'>$&</a>")
    parsedChannel = @getData().channel?.replace(TOPICREGEX, "<a href='#'>$&</a>")

    """
