Merge pull request #6066 from tchak/fix-notifications

Try to fix orange badge hell
This commit is contained in:
Paul Chavard 2021-04-07 15:17:12 +01:00 committed by GitHub
commit 113dbe4969
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,9 @@ module Instructeurs
if @commentaire.save
@commentaire.dossier.update!(last_commentaire_updated_at: Time.zone.now)
current_instructeur.follow(dossier)
if !current_instructeur.follow?(dossier)
current_instructeur.follow(dossier)
end
flash.notice = "Message envoyé"
redirect_to messagerie_instructeur_dossier_path(procedure, dossier)
else