about summary refs log tree commit diff
path: root/app/services/bootstrap_timeline_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-02-23 16:45:22 +0100
committerGitHub <noreply@github.com>2022-02-23 16:45:22 +0100
commit7b816eb5aeeed61fa1e3a7c95cbb5bb7978f7fa5 (patch)
tree5888b4ec8bbb68d88c527ec8dada549f4a6c9b77 /app/services/bootstrap_timeline_service.rb
parent3e12abc1fe9b32f69eaf2a8d1edf8bad9622eb4a (diff)
Add notifications for new sign-ups (#16953)
Diffstat (limited to 'app/services/bootstrap_timeline_service.rb')
-rw-r--r--app/services/bootstrap_timeline_service.rb7
1 files changed, 7 insertions, 0 deletions
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