mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: check for existence of post before creating notification
This commit is contained in:
@@ -280,7 +280,7 @@ class PostAlerter
|
||||
|
||||
DiscourseEvent.trigger(:before_create_notification, user, type, post, opts)
|
||||
|
||||
return if user.blank? || user.bot?
|
||||
return if user.blank? || user.bot? || post.blank?
|
||||
return if (topic = post.topic).blank?
|
||||
|
||||
is_liked = type == Notification.types[:liked]
|
||||
|
||||
Reference in New Issue
Block a user