From 7b816eb5aeeed61fa1e3a7c95cbb5bb7978f7fa5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 23 Feb 2022 16:45:22 +0100 Subject: Add notifications for new sign-ups (#16953) --- app/services/bootstrap_timeline_service.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/services/bootstrap_timeline_service.rb') diff --git a/app/services/bootstrap_timeline_service.rb b/app/services/bootstrap_timeline_service.rb index e1a1b98c3..70e7cc570 100644 --- a/app/services/bootstrap_timeline_service.rb +++ b/app/services/bootstrap_timeline_service.rb @@ -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 -- cgit