]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
check for notification flags in FavCommand
authorEvan Prodromou <evan@controlyourself.ca>
Sat, 4 Oct 2008 17:45:19 +0000 (13:45 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Sat, 4 Oct 2008 17:45:19 +0000 (13:45 -0400)
darcs-hash:20081004174519-5ed1f-1b9f8d1f12c895eacead8703cbfb088a135e810c.gz

classes/Command.php

index ead6a56cc1affa6181b524dc04c17a00e431b298..e5dc59313d16edeee58d1136cf96076b06292a74 100644 (file)
@@ -133,7 +133,14 @@ class FavCommand extends Command {
                        return;
                }
 
-               mail_notify_fave($recipient, $this->user, $notice);
+           $other = User::staticGet('id', $recipient->id);
+               
+               if ($other && $other->id != $user->id) {
+                       if ($other->email && $other->emailnotifyfav) {
+                               mail_notify_fave($other, $this->user, $notice);
+                       }
+               }
+               
                $this->user->blowFavesCache();
                
                $channel->output($this->user, _('Notice marked as fave.'));