anchor.diff:          message: ->
           presence: @presenceCallback
           connect: ->
  -        heartbeat: 20
  +        heartbeat: @heartbeat
         )
   
       subscribeToServerChannel: ->
  
positive.code:       @pubnub.here_now
          channel: @chat_channel
          state: true
          callback: (m) =>
            uuids_with_status = _.map(m.uuids, (uuid) -> 
                { uuid: uuid.uuid, status: 'online', name: uuid.state.name, email: uuid.state.email }
            )
            React.render(<ParticipantsList participants=uuids_with_status />, @react('ParticipantsList'))  
  
      ###################### SUSCRIBE #########################
  
      subscribeToChatChannel: ->
  
  
negative.code: 
      ###################### CALLBACKS #########################
  
      presenceCallback: (message) =>
  
        React.render(<ActivityFeed newActivity=message />, @react('ActivityFeed'))
        
        status = switch message.action
            when 'leave' then 'offline'
            when 'timeout' then 'offline'
            when 'join' then 'online'
  
        participants = [{uuid: message.uuid, status: status}]
        React.render(<ParticipantsList participants=participants />, @react('ParticipantsList')) 
  
      serverCallback: (message, env, ch, timer, magic_ch) =>
        switch(message.event)
          when 'question' then React.render(<QuestionDisplay question=message.data.question />, @react('QuestionDisplay'))
          when 'answered'
            if message.data.uuid == @uuid
              if message.data.correct
                React.render(<CorrectAnswer />, @react('QuestionDisplay'))
              else
                React.render(<WrongAnswer />, @react('QuestionDisplay'))
  
            activity = { 
                        action: message.event,
                        timestamp: message.data.timestamp, 
                        uuid: message.data.uuid, 
                        data:  
                          name: message.data.name
                          correct: message.data.correct
                      }
            React.render(<ActivityFeed newActivity=activity />, @react('ActivityFeed'))   
  
          when 'results' then React.render(<ResultsDisplay results=message.data.results />, @react('QuestionDisplay')) 
        
      ##################### CLIENT COMMANDS ###################
  
  