From a91878add7f3ddc58ef9de33c859c947e1f0a774 Mon Sep 17 00:00:00 2001 From: NangKhatMang Date: Wed, 5 Nov 2025 17:44:49 +0630 Subject: [PATCH 1/2] Add custom timelines to account timelines --- .../overrides/extended_account_statuses_filter.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/lib/overrides/extended_account_statuses_filter.rb b/app/lib/overrides/extended_account_statuses_filter.rb index 68e2242..d82cb21 100644 --- a/app/lib/overrides/extended_account_statuses_filter.rb +++ b/app/lib/overrides/extended_account_statuses_filter.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true module Overrides::ExtendedAccountStatusesFilter + include Redisable + KEYS = %i( pinned tagged @@ -9,6 +11,7 @@ module Overrides::ExtendedAccountStatusesFilter only_reblogs exclude_original_statuses exclude_direct_statuses + include_custom_timelines ).freeze def results @@ -22,6 +25,7 @@ def results scope.merge!(hashtag_scope) if tagged? scope.merge!(only_rebogs_scope) if only_reblogs? scope.merge!(no_direct_statuses_scope) if exclude_direct_statuses? + scope.merge!(custom_scope) if include_custom_timelines? scope end @@ -51,4 +55,14 @@ def exclude_original_statuses? def exclude_direct_statuses? truthy_param?(:exclude_direct_statuses) end + + def include_custom_timelines? + truthy_param?(:include_custom_timelines) + end + + # for custom timelines + def custom_scope + status_ids = redis.zrange(FeedManager.instance.key(:custom, @account.id), 0, -1) + Status.where(id: status_ids).joins(:account).merge(Account.without_suspended.without_silenced) + end end From d6da16ab60cfe59b46373b27c4b1fcad51bf29a5 Mon Sep 17 00:00:00 2001 From: NangKhatMang Date: Thu, 6 Nov 2025 10:50:38 +0630 Subject: [PATCH 2/2] edit custom timelines merge --- app/lib/overrides/extended_account_statuses_filter.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/lib/overrides/extended_account_statuses_filter.rb b/app/lib/overrides/extended_account_statuses_filter.rb index d82cb21..0118159 100644 --- a/app/lib/overrides/extended_account_statuses_filter.rb +++ b/app/lib/overrides/extended_account_statuses_filter.rb @@ -11,7 +11,6 @@ module Overrides::ExtendedAccountStatusesFilter only_reblogs exclude_original_statuses exclude_direct_statuses - include_custom_timelines ).freeze def results @@ -25,7 +24,7 @@ def results scope.merge!(hashtag_scope) if tagged? scope.merge!(only_rebogs_scope) if only_reblogs? scope.merge!(no_direct_statuses_scope) if exclude_direct_statuses? - scope.merge!(custom_scope) if include_custom_timelines? + scope.merge!(custom_scope) if no_boost_channel? scope end @@ -56,8 +55,8 @@ def exclude_direct_statuses? truthy_param?(:exclude_direct_statuses) end - def include_custom_timelines? - truthy_param?(:include_custom_timelines) + def no_boost_channel? + ServerSetting.find_by(name: "No-Boost")&.value == true end # for custom timelines