DEV: don't send staff welcome message to first admin.

This commit is contained in:
Vinoth Kannan 2019-11-28 05:19:46 +05:30
parent 0fed417439
commit fd8ce7256c

View File

@ -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,