]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't send favorite notifications unless the user wants it.
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 13 Jul 2014 10:58:52 +0000 (12:58 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 13 Jul 2014 10:58:52 +0000 (12:58 +0200)
plugins/Favorite/FavoritePlugin.php

index 0dcd78202e2f4b12b7ef2ac591635801ab5b6ac4..144fef77978173c896d17dd5cbe70f10be752e85 100644 (file)
@@ -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());
             }
         }