Add status to the list feed when the tag matches.

pull/2675/head
JS Moore 2024-03-09 18:08:05 -05:00
parent cc9a5c9654
commit c811a79c9b
No known key found for this signature in database
GPG Key ID: E313C2B57F81A0BA
5 changed files with 8 additions and 4 deletions

View File

@ -32,7 +32,6 @@ class Api::V1::Lists::AccountsController < Api::BaseController
private
def set_list
Rails.logger.warn "This is concerning! #{current_account} and #{params}"
@list = List.where(account: current_account).find(params[:list_id])
end

View File

@ -32,7 +32,6 @@ class Api::V1::Lists::TagsController < Api::BaseController
private
def set_list
Rails.logger.warn "This is tagged concerning! #{current_account} and #{params}"
@list = List.where(account: current_account).find(params[:list_id])
end

View File

@ -443,13 +443,11 @@ class FeedManager
should_filter = !crutches[:following][status.in_reply_to_account_id] # and I'm not following the person it's a reply to
should_filter &&= receiver_id != status.in_reply_to_account_id # and it's not a reply to me
should_filter &&= status.account_id != status.in_reply_to_account_id # and it's not a self-reply
return !!should_filter
elsif status.reblog? # Filter out a reblog
should_filter = crutches[:hiding_reblogs][status.account_id] # if the reblogger's reblogs are suppressed
should_filter ||= crutches[:blocked_by][status.reblog.account_id] # or if the author of the reblogged status is blocking me
should_filter ||= crutches[:domain_blocking][status.reblog.account.domain] # or the author's domain is blocked
return !!should_filter
end

View File

@ -28,6 +28,9 @@ class Tag < ApplicationRecord
has_many :featured_tags, dependent: :destroy, inverse_of: :tag
has_many :followers, through: :passive_relationships, source: :account
has_many :list_tags, inverse_of: :tag, dependent: :destroy
has_many :lists, through: :list_tags
HASHTAG_SEPARATORS = "_\u00B7\u30FB\u200c"
HASHTAG_FIRST_SEQUENCE_CHUNK_ONE = "[[:word:]_][[:word:]#{HASHTAG_SEPARATORS}]*[[:alpha:]#{HASHTAG_SEPARATORS}]"
HASHTAG_FIRST_SEQUENCE_CHUNK_TWO = "[[:word:]#{HASHTAG_SEPARATORS}]*[[:word:]_]"

View File

@ -113,6 +113,11 @@ class FanOutOnWriteService < BaseService
end
def deliver_to_lists!
@status.tags.each do |tag|
FeedInsertWorker.push_bulk(tag.lists) do |list|
[@status.id, list.id, 'list', { 'update' => update? }]
end
end
@account.lists_for_local_distribution.select(:id).reorder(nil).find_in_batches do |lists|
FeedInsertWorker.push_bulk(lists) do |list|
[@status.id, list.id, 'list', { 'update' => update? }]