about summary refs log tree commit diff
path: root/app/controllers/api/v1/notifications_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-09-11 15:16:29 +0200
committerGitHub <noreply@github.com>2020-09-11 15:16:29 +0200
commite6b272e5c9c227cfbbe375a893f567c5967d669c (patch)
tree83aa2fe629cc54225531852fe7020388277ba040 /app/controllers/api/v1/notifications_controller.rb
parente6d67f85e288a5c3137c9fc09f99c9051544d87c (diff)
Change REST API to return empty data for suspended accounts (#14765)
Diffstat (limited to 'app/controllers/api/v1/notifications_controller.rb')
-rw-r--r--app/controllers/api/v1/notifications_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/notifications_controller.rb b/app/controllers/api/v1/notifications_controller.rb
index 9d03cb879..522c35ba5 100644
--- a/app/controllers/api/v1/notifications_controller.rb
+++ b/app/controllers/api/v1/notifications_controller.rb
@@ -14,7 +14,7 @@ class Api::V1::NotificationsController < Api::BaseController
   end
 
   def show
-    @notification = current_account.notifications.find(params[:id])
+    @notification = current_account.notifications.without_suspended.find(params[:id])
     render json: @notification, serializer: REST::NotificationSerializer
   end
 
@@ -40,7 +40,7 @@ class Api::V1::NotificationsController < Api::BaseController
   end
 
   def browserable_account_notifications
-    current_account.notifications.browserable(exclude_types, from_account)
+    current_account.notifications.without_suspended.browserable(exclude_types, from_account)
   end
 
   def target_statuses_from_notifications