mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 18:13:42 +01:00
Fix Status.permitted_for scope query
This commit is contained in:
parent
50660d54e8
commit
31c633e528
1 changed files with 1 additions and 2 deletions
|
@ -158,8 +158,7 @@ class Status < ApplicationRecord
|
|||
elsif !account.nil? && target_account.blocking?(account)
|
||||
where('1 = 0')
|
||||
elsif !account.nil?
|
||||
joins('LEFT OUTER JOIN mentions ON statuses.id = mentions.status_id')
|
||||
.where('mentions.account_id = ?', account.id)
|
||||
joins('LEFT OUTER JOIN mentions ON statuses.id = mentions.status_id AND mentions.account_id = ' + account.id.to_s)
|
||||
.where('statuses.visibility != ? OR mentions.id IS NOT NULL', Status.visibilities[:private])
|
||||
else
|
||||
where.not(visibility: :private)
|
||||
|
|
Loading…
Reference in a new issue