Add notifications for new sign-ups (#16953)

This commit is contained in:
Eugen Rochko
2022-02-23 16:45:22 +01:00
committed by GitHub
parent 3e12abc1fe
commit 7b816eb5ae
11 changed files with 73 additions and 65 deletions

View File

@ -5,6 +5,7 @@ class BootstrapTimelineService < BaseService
@source_account = source_account
autofollow_inviter!
notify_staff!
end
private
@ -14,4 +15,10 @@ class BootstrapTimelineService < BaseService
FollowService.new.call(@source_account, @source_account.user.invite.user.account)
end
def notify_staff!
User.staff.includes(:account).find_each do |user|
NotifyService.new.call(user.account, :'admin.new_user', @source_account)
end
end
end