     @socialChannel = channel
 
 
-  initPrivateMessage: (callback) ->
-
-    socialHelpers.initChannel (err, channel) =>
-      return callback err  if err
-
-      @setSocialChannel channel
-      envHelpers.updateWorkspace @workspaceData, { channelId : channel.id }
-        .then =>
-          @workspaceData.channelId = channel.id
-          callback null, channel
-          @chat.ready => @chat.emit 'CollaborationNotInitialized'
-        .error callback
-
-
   fetchSocialChannel: (callback) ->
 
     if @socialChannel

    if @rtm?.isReady
    then callback()
    else @once 'RTMIsReady', callback


  showChat: ->

    return @createChatPane()  unless @chat

    @chat.start()


  createChatPane: ->

    @startChatSession (err, channel) =>

      return showError err  if err

      @createChatPaneView channel


  createChatPaneView: (channel) ->
    return throwError 'RealtimeManager is not set'  unless @rtm

    options = { @rtm, @isInSession }
    @getView().addSubView @chat = new IDEChatView options, channel
    @chat.show()

    @on 'RTMIsReady', =>
      @listChatParticipants (accounts) =>
        @chat.settingsPane.createParticipantsList accounts

      @statusBar.emit 'CollaborationStarted'

      {settingsPane} = @chat

      settingsPane.on 'ParticipantKicked', @bound 'handleParticipantKicked'
      settingsPane.updateDefaultPermissions()


  kickParticipant: (account) ->

      callback accounts


  getRealtimeFileName: (id) ->

    id or= @getSocialChannelId()
