From a9bfa1979d8cb5cea9b6b2e48299d42b739001eb Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 13 Jul 2014 12:58:52 +0200 Subject: [PATCH] Don't send favorite notifications unless the user wants it. --- plugins/Favorite/FavoritePlugin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Favorite/FavoritePlugin.php b/plugins/Favorite/FavoritePlugin.php index 0dcd78202e..144fef7797 100644 --- a/plugins/Favorite/FavoritePlugin.php +++ b/plugins/Favorite/FavoritePlugin.php @@ -197,7 +197,8 @@ class FavoritePlugin extends ActivityHandlerPlugin foreach ($mentioned_ids as $id) { $mentioned = User::getKV('id', $id); - if ($mentioned instanceof User && $mentioned->id != $stored->profile_id) { + if ($mentioned instanceof User && $mentioned->id != $stored->profile_id + && $mentioned->email && $mentioned->emailnotifyfav) { // do we have an email, and does user want it? mail_notify_fave($mentioned, $stored->getProfile(), $stored->getParent()); } }