]> cat aescling's git repositories - mastodon.git/commitdiff
Check @recipient.user at the first (#1939)
authoralpaca-tc <alpaca-tc@alpaca.tc>
Sun, 16 Apr 2017 16:04:05 +0000 (01:04 +0900)
committerEugen <eugen@zeonfederated.com>
Sun, 16 Apr 2017 16:04:05 +0000 (18:04 +0200)
app/services/notify_service.rb

index ffeee5fcf42473f6eaa9be06696c622191c0732b..00f7cbd00cb95598cfc87fcc39c3992a5835f78a 100644 (file)
@@ -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?