mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
16 lines
425 B
Ruby
16 lines
425 B
Ruby
# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
# Trigger GraphQL subscriptions on user changes.
|
|
module User::TriggersSubscriptions
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
after_update_commit :trigger_subscriptions
|
|
end
|
|
|
|
private
|
|
|
|
def trigger_subscriptions
|
|
Gql::Subscriptions::UserUpdates.trigger(self, arguments: { user_id: Gql::ZammadSchema.id_from_object(self) })
|
|
end
|
|
end
|