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
1 changed files with 1 additions and 0 deletions

View File

@ -418,6 +418,7 @@ class User < ActiveRecord::Base
def enqueue_staff_welcome_message(role) def enqueue_staff_welcome_message(role)
return unless staff? return unless staff?
return if role == :admin && User.real.where(admin: true).count == 1
Jobs.enqueue( Jobs.enqueue(
:send_system_message, :send_system_message,