]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/mail.php
Links to photo pages in gallery
[quix0rs-gnu-social.git] / lib / mail.php
index 3703e5c35d88e796e0e23ba9afde40452571c604..dd6a1a366e80ac75126a2040aa20774219151b54 100644 (file)
@@ -593,6 +593,10 @@ function mail_notify_fave($other, $user, $notice)
     }
 
     $profile = $user->getProfile();
+    if ($other->hasBlocked($profile)) {
+        // If the author has blocked us, don't spam them with a notification.
+        return;
+    }
 
     $bestname = $profile->getBestName();
 
@@ -600,7 +604,7 @@ function mail_notify_fave($other, $user, $notice)
 
     // TRANS: Subject for favorite notification e-mail.
     // TRANS: %1$s is the adding user's long name, %2$s is the adding user's nickname.
-    $subject = sprintf(_('%1s$ (@%2$s) added your notice as a favorite'), $bestname, $user->nickname);
+    $subject = sprintf(_('%1$s (@%2$s) added your notice as a favorite'), $bestname, $user->nickname);
 
     // TRANS: Body for favorite notification e-mail.
     // TRANS: %1$s is the adding user's long name, $2$s is the date the notice was created,