       options :
         name : 'Inbox'
       data : @mainView
-    
+
   initAndBringToFront:(options,callback)->
     initApplication options, ->
-      @bringToFront() 
+      @bringToFront()
       callback()
-  
+
   initApplication:(options, callback)->
     callback()
-  
+
   fetchMessages:(options, callback)->
     # log "FETCH MESSAGES INTERNAL"
     {currentDelegate} = KD.getSingleton('mainController').getVisitor()
     currentDelegate.fetchMail? options, callback
-  
+
   fetchAutoCompleteForToField:(inputValue,blacklist,callback)->
     bongo.api.JAccount.byRelevance inputValue,{blacklist},(err,accounts)->
-      callback accounts  
+      callback accounts
 
   loadView:(mainView)->
     mainView.createCommons()
     mainView.createTabs()
-    
+
     {currentDelegate} = KD.getSingleton('mainController').getVisitor()
 
-    currentDelegate.fetchPrivateChannel (err, channel)->
-      console.log channel
+    # currentDelegate.fetchPrivateChannel (err, channel)->
+    #   console.log channel
 
     # mainView.inboxMessagesList.on 'ReceivedClickElsewhere', =>
     #   @deselectMessages()

    #     {reply, message} = options
    #     message.reply reply, (err)->
    #       console.log err
    
    mainView.registerListener
      KDEventTypes      : 'NotificationIsSelected'
      listener          : @


  deselectMessages:->
    @selection = {}

  sendMessage:(messageDetails, callback)->
    # log "I just send a new message: ", messageDetails
    bongo.api.JPrivateMessage.create messageDetails, callback

  prepareMessage:(formOutput, callback)=>
    {body, subject, recipients} = formOutput

    to = recipients.join ' '

    @sendMessage {to, body, subject}, (err, message)->
      new KDNotificationView
        title     : if err then "There was an error sending your message - try again" else "Message Sent!"
