]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Favorite/actions/apifavoritecreate.php
Email notify-on-fave moved to Profile_prefs (run upgrade.php)
[quix0rs-gnu-social.git] / plugins / Favorite / actions / apifavoritecreate.php
index 4172692441413493b02b57602fed7a18cb910e57..e0c8c0cd83902c603cb6c39c0f373673dfff7999 100644 (file)
@@ -162,12 +162,10 @@ class ApiFavoriteCreateAction extends ApiAuthAction
     function notify($fave, $notice, $user)
     {
         $other = User::getKV('id', $notice->profile_id);
-        if ($other && $other->id != $user->id) {
-            if ($other->email && $other->emailnotifyfav) {
-                require_once INSTALLDIR.'/lib/mail.php';
+        if ($other && $other->id != $user->id && !empty($other->email)) {
+            require_once INSTALLDIR.'/lib/mail.php';
 
-                mail_notify_fave($other, $user->getProfile(), $notice);
-            }
+            mail_notify_fave($other, $user->getProfile(), $notice);
             // XXX: notify by IM
             // XXX: notify by SMS
         }