From 19f63ff8013644c53862849b86f60a97193a8745 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 ffeee5fcf..00f7cbd00 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?