     @receiveFriendInfo(data)
     @markerColour = colour
 
+  receiveFriendInfo: (data) ->
+    friendInfo = {colour: data.colour}
+    unless _.contains(@friendColours, friendInfo.colour)
+      @friendColours.push(data.colour)
+    unless friendInfo.markerSeen
+      @addMarker 0, data.colour
+      friendInfo.markerSeen = true
 
   getKeysFromConfig: ->
     @app_key = atom.config.get('pusher_app_key') || 'd41a439c438a100756f5'

      alertView = new AlertView "Please set your Pusher keys."
      atom.workspace.addModalPanel(item: alertView, visible: true)
    else
      colourIndex = _.random(0, @colours.length)
      @markerColour = @colours[colourIndex]
      @sessionId = "#{@app_key}-#{@app_secret}-#{randomstring.generate(11)}-#{colourIndex}"
      @startView = new StartView(@sessionId)
      @startPanel = atom.workspace.addModalPanel(item: @startView, visible: true)
      @startView.focus()
      @startPairing()

  inviteOverHipChat: ->
    @getKeysFromConfig()

      return unless rows.length > 1
      @pairingChannel.trigger 'client-text-select', {colour: @markerColour, rows: rows}

  syncGrammars: ->
    @editor.on 'grammar-changed', => @sendGrammar()

