about summary refs log tree commit diff
path: root/app/services/activitypub
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-17 08:28:17 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-01-17 08:28:52 +0100
commit2d4b4b0b4545a4dc914c71fa72638f13d21f3d4f (patch)
treebfb87120970adeaf62c478505a52a43cc30318fb /app/services/activitypub
parenta85912b0d6d2ee68aa35794fbb51c5358768c092 (diff)
parentd5c9feb7b7fc489afbd0a287431fe07b42451ef0 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/accounts_controller.rb`:
  Upstream introduced support for private pinned toots, but glitch-soc's query
  was a bit different as it filtered out local-only toots.
  Used upstream's query, while adding local-only filtering back.
- `app/controllers/activitypub/collections_controller.rb`:
  Same thing with regards to local-only posts.
- `app/validators/status_pin_validator.rb`:
  Not a real conflict, but the line below was different in glitch-soc due to
  the configurable pinned toots limit.
Diffstat (limited to 'app/services/activitypub')
-rw-r--r--app/services/activitypub/fetch_featured_collection_service.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/activitypub/fetch_featured_collection_service.rb b/app/services/activitypub/fetch_featured_collection_service.rb
index 72352aca6..9fce478c1 100644
--- a/app/services/activitypub/fetch_featured_collection_service.rb
+++ b/app/services/activitypub/fetch_featured_collection_service.rb
@@ -23,7 +23,7 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
 
   def process_items(items)
     status_ids = items.map { |item| value_or_id(item) }
-                      .filter_map { |uri| ActivityPub::FetchRemoteStatusService.new.call(uri) unless ActivityPub::TagManager.instance.local_uri?(uri) }
+                      .filter_map { |uri| ActivityPub::FetchRemoteStatusService.new.call(uri, on_behalf_of: local_follower) unless ActivityPub::TagManager.instance.local_uri?(uri) }
                       .filter_map { |status| status.id if status.account_id == @account.id }
     to_remove = []
     to_add    = status_ids
@@ -46,4 +46,8 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
   def supported_context?
     super(@json)
   end
+
+  def local_follower
+    @local_follower ||= account.followers.local.without_suspended.first
+  end
 end