Fix email notification when commenting anonymous post (#388)

This commit is contained in:
Riccardo Graziosi
2024-07-25 17:54:07 +02:00
committed by GitHub
parent 97eb40f0c6
commit ab23ab2c9b

View File

@@ -15,6 +15,8 @@ class SendNotificationForCommentWorkflow
if comment.parent_id == nil # Reply to a post
user = comment.post.user
return if user.nil? # anonymous posts don't have a user
if comment.user.id != user.id and
user.notifications_enabled? and