mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Don't notify without notifiable attendees
Summary: Events with no attendees (e.g. fresh instances of recurring events) would trigger an exception when sending notifications, because `$attendee_map` would still get populated. Test Plan: Declined event, restarted daemons. Did not see exception. Accepted event, restarted daemons. Saw "[Calendar] [Reminder]" email. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D18835
This commit is contained in:
parent
e411d75964
commit
393824656f
1 changed files with 3 additions and 2 deletions
|
@ -100,10 +100,11 @@ final class PhabricatorCalendarNotificationEngine
|
|||
}
|
||||
$notifiable_phids[] = $invitee->getInviteePHID();
|
||||
}
|
||||
if (!$notifiable_phids) {
|
||||
if ($notifiable_phids) {
|
||||
$attendee_map[$key] = array_fuse($notifiable_phids);
|
||||
} else {
|
||||
unset($events[$key]);
|
||||
}
|
||||
$attendee_map[$key] = array_fuse($notifiable_phids);
|
||||
}
|
||||
if (!$attendee_map) {
|
||||
// None of the events have any notifiable attendees, so there is no
|
||||
|
|
Loading…
Reference in a new issue