]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't send @-reply notification if the mentioned person has blocked the sender
authorEvan Prodromou <evan@status.net>
Fri, 7 Sep 2012 14:27:14 +0000 (10:27 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 7 Sep 2012 14:27:14 +0000 (10:27 -0400)
lib/mail.php

index 17a58de469b979a942f941d0b556675efd762629..223721a34547a9630405557f9f10a88d924a827e 100644 (file)
@@ -736,6 +736,11 @@ function mail_notify_attn($user, $notice)
         return;
     }
 
+    if ($user->hasBlocked($sender)) {
+        // If the author has blocked us, don't spam them with a notification.
+        return;
+    }
+
     $bestname = $sender->getBestName();
 
     common_switch_locale($user->language);