about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-02-25 18:05:52 +0100
committerGitHub <noreply@github.com>2020-02-25 18:05:52 +0100
commit9ee8e1add9f937a75c2514ca88958ff02cf5573c (patch)
treee6c97dfd5a14860b9c825b1c84fb1dd84ada6581 /app/controllers
parent0d41fef50618e3d58255b4f4082326e83ff06982 (diff)
parent2f2b48b227304d0f0a28dd4867e84af10b8097ad (diff)
Merge pull request #1289 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
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