From 5c2010661a575cd2b232bfdd9111db00ad63efa9 Mon Sep 17 00:00:00 2001 From: alpaca-tc Date: Mon, 17 Apr 2017 01:04:05 +0900 Subject: [PATCH] Check @recipient.user at the first (#1939) --- app/services/notify_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index ffeee5fcf4..00f7cbd00c 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -6,7 +6,7 @@ class NotifyService < BaseService @activity = activity @notification = Notification.new(account: @recipient, activity: @activity) - return if blocked? || recipient.user.nil? + return if recipient.user.nil? || blocked? create_notification send_email if email_enabled?