From 13de577568e6059f8b1cbaf3076dc9c29ceb2c87 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 17 Apr 2015 15:38:44 -0400 Subject: [PATCH] FIX: Error alerting tracking users of PM when replying in general --- app/services/post_alerter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/post_alerter.rb b/app/services/post_alerter.rb index 9064177433c..56c2fbe20bf 100644 --- a/app/services/post_alerter.rb +++ b/app/services/post_alerter.rb @@ -16,7 +16,7 @@ class PostAlerter user.id == post.user_id end.each do |user| if TopicUser.get(post.topic, user).try(:notification_level) == TopicUser.notification_levels[:tracking] - next unless post.reply_to_post_number || post.reply_to_post.user_id == user.id + next unless post.reply_to_post_number || post.reply_to_post.try(:user_id) == user.id end create_notification(user, Notification.types[:private_message], post) end