1
0
Fork 1
forked from fedi/mastodon

Add webhook account.approved (#22938)

* Webhook `account.approved` when preparing new user

* Update Webhook.EVENTS
This commit is contained in:
Alexander Ivanov 2023-01-05 20:29:49 +08:00 committed by talon
parent 20c95a6f83
commit b4eff6802f
2 changed files with 2 additions and 0 deletions

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!

View file

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