mirror of
https://github.com/discourse/discourse.git
synced 2025-04-09 07:21:41 +08:00
Update app/services/user_silencer.rb
Co-Authored-By: eviltrout <robin.ward@gmail.com>
This commit is contained in:
parent
bc3efab816
commit
7aecd3c2f5
@ -17,7 +17,7 @@ class UserSilencer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.was_silenced_for?(post)
|
def self.was_silenced_for?(post)
|
||||||
return false unless post.present?
|
return false if post.blank?
|
||||||
|
|
||||||
UserHistory.where(action: UserHistory.actions[:silence_user], post: post).exists?
|
UserHistory.where(action: UserHistory.actions[:silence_user], post: post).exists?
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user