From fd8ce7256c3d8b2948660d4e9d7a7213aa8561c2 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Thu, 28 Nov 2019 05:19:46 +0530 Subject: [PATCH] DEV: don't send staff welcome message to first admin. --- app/models/user.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/user.rb b/app/models/user.rb index e90315db6a9..4d211b16984 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -418,6 +418,7 @@ class User < ActiveRecord::Base def enqueue_staff_welcome_message(role) return unless staff? + return if role == :admin && User.real.where(admin: true).count == 1 Jobs.enqueue( :send_system_message,