mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Fix dismissing an announcement twice raising an obscure error (#13124)
This commit is contained in:
parent
cf4fe6caef
commit
7face973fa
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user