From a5a35482122ad5bcb71b49670e775aead39abe8b Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 4 Oct 2008 13:45:19 -0400 Subject: [PATCH] check for notification flags in FavCommand darcs-hash:20081004174519-5ed1f-1b9f8d1f12c895eacead8703cbfb088a135e810c.gz --- classes/Command.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classes/Command.php b/classes/Command.php index ead6a56cc1..e5dc59313d 100644 --- a/classes/Command.php +++ b/classes/Command.php @@ -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.')); -- 2.39.5