FIX: Do not show post notices for bots.

This commit is contained in:
Dan Ungureanu 2019-03-20 11:57:52 +02:00
parent 6f1badc7c9
commit eed1c9e0e3
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84

View File

@ -371,7 +371,7 @@ class PostSerializer < BasicPostSerializer
def include_post_notice_type?
return false if !scope.user || !scope.user.id || scope.user.id == object.user_id ||
!object.user || object.user.anonymous? ||
!object.user || object.user.anonymous? || object.user.bot?
!scope.user.has_trust_level?(SiteSetting.min_post_notice_tl)
post_notice_type.present?