Don't send favorite notifications unless the user wants it.

This commit is contained in:
Mikael Nordfeldth 2014-07-13 12:58:52 +02:00
parent 6f593a79d4
commit a9bfa1979d

View File

@ -197,7 +197,8 @@ class FavoritePlugin extends ActivityHandlerPlugin
foreach ($mentioned_ids as $id) { foreach ($mentioned_ids as $id) {
$mentioned = User::getKV('id', $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()); mail_notify_fave($mentioned, $stored->getProfile(), $stored->getParent());
} }
} }