mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
human?
helper method on a user
This is cleaner than hard coding `id > 0` in ruby code.
This commit is contained in:
@ -226,7 +226,7 @@ class PostDestroyer
|
||||
end
|
||||
|
||||
def agree_with_flags
|
||||
if @post.has_active_flag? && @user.id > 0 && @user.staff?
|
||||
if @post.has_active_flag? && @user.human? && @user.staff?
|
||||
Jobs.enqueue(
|
||||
:send_system_message,
|
||||
user_id: @post.user_id,
|
||||
|
Reference in New Issue
Block a user