File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 37
37
use App \Notification ;
38
38
use App \Profile ;
39
39
use App \Services \AccountService ;
40
+ use App \Services \AdminShadowFilterService ;
40
41
use App \Services \BookmarkService ;
41
42
use App \Services \BouncerService ;
42
43
use App \Services \CollectionService ;
@@ -2648,7 +2649,7 @@ public function timelinePublic(Request $request)
2648
2649
$ domainBlocks = UserFilterService::domainBlocks ($ user ->profile_id );
2649
2650
$ hideNsfw = config ('instance.hide_nsfw_on_public_feeds ' );
2650
2651
$ amin = SnowflakeService::byDate (now ()->subDays (config ('federation.network_timeline_days_falloff ' )));
2651
-
2652
+ $ asf = AdminShadowFilterService:: getHideFromPublicFeedsList ();
2652
2653
if ($ local && $ remote ) {
2653
2654
$ feed = Status::select (
2654
2655
'id ' ,
@@ -2824,6 +2825,21 @@ public function timelinePublic(Request $request)
2824
2825
2825
2826
return ! in_array ($ domain , $ domainBlocks );
2826
2827
})
2828
+ ->filter (function ($ s ) use ($ asf , $ user ) {
2829
+ if (! $ asf || count ($ asf ) === 0 ) {
2830
+ return true ;
2831
+ }
2832
+
2833
+ if (in_array ($ s ['account ' ]['id ' ], $ asf )) {
2834
+ if ($ user ->profile_id == $ s ['account ' ]['id ' ]) {
2835
+ return true ;
2836
+ }
2837
+
2838
+ return false ;
2839
+ }
2840
+
2841
+ return true ;
2842
+ })
2827
2843
->take ($ limit )
2828
2844
->values ();
2829
2845
You can’t perform that action at this time.
0 commit comments