iachat/app/dispatchers/async_dispatcher.rb
Sojan Jose cda65ea339
Feature: Conversation creation email notifications (#576)
* Clean up the mailers

* Disable assignment mailer if setting is turned off

* Email notifications on conversation create

* Specs
2020-03-01 19:06:13 +05:30

13 lines
427 B
Ruby

class AsyncDispatcher < BaseDispatcher
def dispatch(event_name, timestamp, data)
event_object = Events::Base.new(event_name, timestamp, data)
publish(event_object.method_name, event_object)
end
def listeners
listeners = [EmailNotificationListener.instance, ReportingListener.instance, WebhookListener.instance]
listeners << SubscriptionListener.instance if ENV['BILLING_ENABLED']
listeners
end
end