Class: Telephony::ConversationObserver

Inherits:
ActiveRecord::Observer
  • Object
show all
Defined in:
app/observers/telephony/conversation_observer.rb

Instance Method Summary collapse

Instance Method Details

#after_save(conversation) ⇒ Object



3
4
5
6
7
# File 'app/observers/telephony/conversation_observer.rb', line 3

def after_save(conversation)
  return unless conversation.state_was == 'enqueued' || conversation.enqueued?

  PusherEventPublisher.queue_change Conversation.queue_size, Events::Base.select(:id).last.id
end