about summary refs log tree commit diff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-04-14 15:22:55 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:21 -0500
commit2db51e2f4cc55c520634df8ca34b58742ded0153 (patch)
tree8236f6a359d6d501228cf60c725289c252445e27 /app/controllers/api/v1
parentc86c4b95bee3a51ea7a0d11f0a26b50202853dde (diff)
Refactored community-curated world timeline code; **privacy**: remove support for packmate-visible hashtags until we resolve federation caveats.
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r--app/controllers/api/v1/statuses/bookmarks_controller.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/api/v1/statuses/bookmarks_controller.rb b/app/controllers/api/v1/statuses/bookmarks_controller.rb
index bb9729cf5..267f9dff7 100644
--- a/app/controllers/api/v1/statuses/bookmarks_controller.rb
+++ b/app/controllers/api/v1/statuses/bookmarks_controller.rb
@@ -30,10 +30,19 @@ class Api::V1::Statuses::BookmarksController < Api::BaseController
 
     bookmark = Bookmark.find_or_create_by!(account: current_user.account, status: requested_status)
 
+    curate_status(requested_status)
+
     bookmark.status.reload
   end
 
   def requested_status
     Status.find(params[:status_id])
   end
+
+  def curate_status(status)
+    return if status.curated
+    status.curated = true
+    status.save
+    FanOutOnWriteService.new.call(status)
+  end
 end