     @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

      callback accounts


  continuePrivateMessage: (callback) ->

    @chat.emit 'CollaborationStarted'

    @listChatParticipants (accounts) =>
      @statusBar.emit 'ShowAvatars', accounts, @participants.asArray()

    callback null


  startChatSession: (callback) ->

    if @getSocialChannelId()
    then @reactivateChatSession callback
    else @initPrivateMessage callback


  reactivateChatSession: (callback) ->

    @fetchSocialChannel (err, channel) =>
      if err or not channel
        return @initPrivateMessage callback

      @createChatPaneView channel
      @isRealtimeSessionActive channel.id, (isActive, file) =>
        if isActive
          @whenRealtimeReady => @continuePrivateMessage callback
          return @loadCollaborationFile file.id

        @statusBar.share.show()
        @chat.emit 'CollaborationNotInitialized'


  getRealtimeFileName: (id) ->

    id or= @getSocialChannelId()

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


  kickParticipant: (account) ->
