triggers_subscriptions.rb 345 B

1234567891011121314
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. # Trigger GraphQL subscriptions on user changes.
  3. module Macro::TriggersSubscriptions
  4. extend ActiveSupport::Concern
  5. included do
  6. after_commit :trigger_subscriptions
  7. end
  8. def trigger_subscriptions
  9. Gql::Subscriptions::MacrosUpdate.trigger(self)
  10. end
  11. end