 
     if @permissions.get(nick()) is 'read'
       @makeReadOnly()
-
-
-  loadCollaborationFile: (fileId) ->
-
-    return  unless fileId
-
-    @rtmFileId = fileId
-
-    realtimeHelpers.loadCollaborationFile @rtm, fileId, (err, doc) =>
-      return throwError err  if err
-
-      @activateRealtimeManager doc
-      @bindSocialChannelEvents()
-      @finderPane.on 'ChangeHappened', @bound 'syncChange'
 
 
   reviveHostSnapshot: ->

      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()

    @socialChannel = channel


  fetchSocialChannel: (callback) ->

    if @socialChannel
