about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-02-03 01:53:09 +0100
committerGitHub <noreply@github.com>2020-02-03 01:53:09 +0100
commit3adc722d1cdd28d87d2724b8952d7ec52d241b52 (patch)
treef8b08e38d3fba35c92b21b14c99ec2c3d21dd3c6 /app/controllers
parent61a7390b666dc40beda291da426436a9d36f4288 (diff)
Change how unread announcements are handled (#13020)
* Change meaning of /api/v1/announcements/:id/dismiss to mark an announcement as read

* Change how unread announcements are counted in UI

* Add unread marker to announcements and mark announcements as unread as they are displayed

* Fixups
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/v1/announcements_controller.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/api/v1/announcements_controller.rb b/app/controllers/api/v1/announcements_controller.rb
index 6724fac2e..1e692ff75 100644
--- a/app/controllers/api/v1/announcements_controller.rb
+++ b/app/controllers/api/v1/announcements_controller.rb
@@ -19,11 +19,7 @@ class Api::V1::AnnouncementsController < Api::BaseController
 
   def set_announcements
     @announcements = begin
-      scope = Announcement.published
-
-      scope.merge!(Announcement.without_muted(current_account)) unless truthy_param?(:with_dismissed)
-
-      scope.chronological
+      Announcement.published.chronological
     end
   end