mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Fix email notification when commenting anonymous post (#388)
This commit is contained in:
committed by
GitHub
parent
97eb40f0c6
commit
ab23ab2c9b
@@ -15,6 +15,8 @@ class SendNotificationForCommentWorkflow
|
|||||||
|
|
||||||
if comment.parent_id == nil # Reply to a post
|
if comment.parent_id == nil # Reply to a post
|
||||||
user = comment.post.user
|
user = comment.post.user
|
||||||
|
|
||||||
|
return if user.nil? # anonymous posts don't have a user
|
||||||
|
|
||||||
if comment.user.id != user.id and
|
if comment.user.id != user.id and
|
||||||
user.notifications_enabled? and
|
user.notifications_enabled? and
|
||||||
|
|||||||
Reference in New Issue
Block a user