diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index 4028a6c25b..cea9c700af 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -228,9 +228,11 @@ final class PhabricatorCalendarEventSearchEngine case 'day': return $query->setParameter('display', 'day'); case 'upcoming': - return $query->setParameter('upcoming', array( - 0 => 'upcoming', - )); + return $query + ->setParameter('display', 'list') + ->setParameter('upcoming', array( + 0 => 'upcoming', + )); case 'all': return $query; } diff --git a/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php b/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php index 17c6d17d5b..49f5fbe293 100644 --- a/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php +++ b/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php @@ -30,8 +30,14 @@ final class PhabricatorRepositoryPushMailWorker $targets = id(new PhabricatorRepositoryPushReplyHandler()) ->setMailReceiver($repository) ->getMailTargets($email_phids, array()); + + $messages = array(); foreach ($targets as $target) { - $this->sendMail($target, $repository, $event); + $messages[] = $this->sendMail($target, $repository, $event); + } + + foreach ($messages as $message) { + $message->save(); } } @@ -121,7 +127,7 @@ final class PhabricatorRepositoryPushMailWorker ->addHeader('Thread-Topic', $subject) ->setIsBulk(true); - $target->sendMail($mail); + return $target->willSendMail($mail); } public function renderForDisplay(PhabricatorUser $viewer) {