FIX: properly filter whispers in user stream

This commit is contained in:
Régis Hanol
2015-09-22 00:50:52 +02:00
parent 2ae032c9b0
commit 4f7140fb32
7 changed files with 18 additions and 17 deletions

View File

@ -218,7 +218,7 @@ class Topic < ActiveRecord::Base
end
end
def visible_post_types(viewed_by=nil)
def self.visible_post_types(viewed_by=nil)
types = Post.types
result = [types[:regular], types[:moderator_action], types[:small_action]]
result << types[:whisper] if viewed_by.try(:staff?)