X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FFavorite%2Factions%2Fapifavoritecreate.php;fp=plugins%2FFavorite%2Factions%2Fapifavoritecreate.php;h=e0c8c0cd83902c603cb6c39c0f373673dfff7999;hb=0a20abf1d8a9a068df9310d6903cc303f39b25ed;hp=4172692441413493b02b57602fed7a18cb910e57;hpb=b46b5885227263785e0e6bb9b53c13680db348a5;p=quix0rs-gnu-social.git diff --git a/plugins/Favorite/actions/apifavoritecreate.php b/plugins/Favorite/actions/apifavoritecreate.php index 4172692441..e0c8c0cd83 100644 --- a/plugins/Favorite/actions/apifavoritecreate.php +++ b/plugins/Favorite/actions/apifavoritecreate.php @@ -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 }