Class: Telephony::Events::CallAnswered

Inherits:
Base
  • Object
show all
Defined in:
app/models/telephony/events/call_answered.rb

Direct Known Subclasses

Answer, Conference

Instance Method Summary collapse

Methods inherited from Base

#active_agent2, #agent1, #agent2, #call, #default_data, find_last_for_agent, #for_agent?, log, new_default_event, #publish, #republish_only_for

Instance Method Details

#agent_messagesObject



10
11
12
13
14
15
16
17
18
19
# File 'app/models/telephony/events/call_answered.rb', line 10

def agent_messages
  [
    {
      agent: call.agent,
      data: {
        owner: agent1 == call.agent
      }
    }
  ]
end

#publishable?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/telephony/events/call_answered.rb', line 6

def publishable?
  call && call.agent?
end