From 1d0ddd33b64fd982a89b85994490d29bcee6819d Mon Sep 17 00:00:00 2001 From: Z Date: Tue, 8 Jun 2021 11:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8E=AA=E6=96=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref: #10, 不过滤转嘟,单独过滤高赞精选bot 不处理的话校友站的跨站已经完全不可用了 --- app/models/status.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/status.rb b/app/models/status.rb index b98d766fe..294d328bc 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -89,8 +89,9 @@ class Status < ApplicationRecord #scope :without_replies, -> { where('statuses.reply = FALSE OR statuses.in_reply_to_account_id = statuses.account_id') } scope :without_replies, -> { where('statuses.reply = FALSE') } #scope :without_reblogs, -> { where('statuses.reblog_of_id IS NULL') } - scope :without_reblogs, -> { joins('INNER JOIN statuses ori ON (statuses.reblog_of_id is NULL AND ori.id = statuses.id) OR ori.id = statuses.reblog_of_id') - .where('ori.account_id = statuses.account_id') } + scope :without_reblogs, -> { where('statuses.account_id != 830') } + #scope :without_reblogs, -> { joins('INNER JOIN statuses ori ON (statuses.reblog_of_id is NULL AND ori.id = statuses.id) OR ori.id = statuses.reblog_of_id') + # .where('ori.account_id = statuses.account_id') } scope :with_public_visibility, -> { where(visibility: :public) } scope :tagged_with, ->(tag_ids) { joins(:statuses_tags).where(statuses_tags: { tag_id: tag_ids }) } scope :in_chosen_languages, ->(account) { where(language: nil).or where(language: account.chosen_languages) }