Check @recipient.user at the first (#1939)
This commit is contained in:
parent
c2b4bafc33
commit
5c2010661a
1 changed files with 1 additions and 1 deletions
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue