discourse-chat-integration/app/jobs/regular/notify_chats.rb

10 lines
371 B
Ruby
Raw Normal View History

module Jobs
class NotifyChats < Jobs::Base
sidekiq_options retry: false # Don't retry, could result in duplicate notifications for some providers
def execute(args)
return if not SiteSetting.chat_integration_enabled? # Plugin may have been disabled since job triggered
::DiscourseChat::Manager.trigger_notifications(args[:post_id])
end
end
end