Browse Source

Add webhook `account.approved` (#22938)

* Webhook `account.approved` when preparing new user

* Update Webhook.EVENTS
closed-social-glitch-2
Alexander Ivanov 1 year ago
committed by GitHub
parent
commit
8eb29741b4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      app/models/user.rb
  2. +1
    -0
      app/models/webhook.rb

+ 1
- 0
app/models/user.rb View File

@ -489,6 +489,7 @@ class User < ApplicationRecord
BootstrapTimelineWorker.perform_async(account_id)
ActivityTracker.increment('activity:accounts:local')
UserMailer.welcome(self).deliver_later
TriggerWebhookWorker.perform_async('account.approved', 'Account', account_id)
end
def prepare_returning_user!

+ 1
- 0
app/models/webhook.rb View File

@ -15,6 +15,7 @@
class Webhook < ApplicationRecord
EVENTS = %w(
account.approved
account.created
report.created
).freeze

Loading…
Cancel
Save