FIX: Don't show bots as post readers

This commit is contained in:
romanrizzi
2019-11-14 17:53:52 -03:00
parent f87d38fc7c
commit ff355ad204
2 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,7 @@ class PostReadersController < ApplicationController
ensure_can_see_readers!(post)
readers = User
.real
.where(staged: false)
.where.not(id: post.user_id)
.joins(:topic_users)