Check @recipient.user at the first (#1939)

pull/1942/head
alpaca-tc 8 years ago committed by Eugen
parent babbb2135e
commit 19f63ff801

@ -6,7 +6,7 @@ class NotifyService < BaseService
@activity = activity @activity = activity
@notification = Notification.new(account: @recipient, activity: @activity) @notification = Notification.new(account: @recipient, activity: @activity)
return if blocked? || recipient.user.nil? return if recipient.user.nil? || blocked?
create_notification create_notification
send_email if email_enabled? send_email if email_enabled?

Loading…
Cancel
Save