mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 11:13:22 +08:00
Do not include moderator posts in the group area.
This commit is contained in:
parent
fd1c824187
commit
e0dee0f10c
|
@ -34,7 +34,8 @@ class Group < ActiveRecord::Base
|
|||
def posts_for(guardian, before_post_id=nil)
|
||||
user_ids = group_users.map {|gu| gu.user_id}
|
||||
result = Post.where(user_id: user_ids).includes(:user, :topic).references(:posts, :topics)
|
||||
result = result.where('topics.archetype <> ?', Archetype.private_message)
|
||||
.where('topics.archetype <> ?', Archetype.private_message)
|
||||
.where(post_type: Post.types[:regular])
|
||||
|
||||
unless guardian.is_staff?
|
||||
allowed_ids = guardian.allowed_category_ids
|
||||
|
|
Loading…
Reference in New Issue
Block a user