about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-02-25 14:28:13 +0100
committerThibaut Girka <thib@sitedethib.com>2020-02-25 14:28:13 +0100
commit85933bc9ff5869e69403315a30c3027d59c7e60d (patch)
treeea2bab292d7fdc97f529aa447300017c4ede00af /app/controllers
parent0d41fef50618e3d58255b4f4082326e83ff06982 (diff)
parent7face973fa1c7d6c18b06d427ea0b7a741d11466 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/v1/announcements_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/announcements_controller.rb b/app/controllers/api/v1/announcements_controller.rb
index 1e692ff75..ee79fc19f 100644
--- a/app/controllers/api/v1/announcements_controller.rb
+++ b/app/controllers/api/v1/announcements_controller.rb
@@ -11,7 +11,7 @@ class Api::V1::AnnouncementsController < Api::BaseController
   end
 
   def dismiss
-    AnnouncementMute.create!(account: current_account, announcement: @announcement)
+    AnnouncementMute.find_or_create_by!(account: current_account, announcement: @announcement)
     render_empty
   end