Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions lib/Service/Proposal/ProposalService.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,12 @@ public function convertProposal(IUser $user, int $proposalId, int $dateId, array
}
$this->applyCalendarBlockersParticipant($user, $proposal, 'M', $vObject);

// keep only the confirmed date so the notification email shows just that one
$confirmedDate = new ProposalDateCollection();
$confirmedDate[] = $selectedDate;
$proposal->setDates($confirmedDate);
// generate notifications for internal and external participants that the meeting is confirmed
$this->generateNotifications($user, $proposal, 'F');
// destroy the proposal entry
$this->proposalVoteMapper->deleteByProposalId($user->getUID(), $proposal->getId());
$this->proposalParticipantMapper->deleteByProposalId($user->getUID(), $proposal->getId());
Expand Down Expand Up @@ -496,6 +502,9 @@ private function sendEmailNotifications(IUser $user, ProposalObject $proposal, P
),
'D' => $template->setSubject(
$this->l10n->t('%s has canceled a proposed meeting', [$senderName])
),
'F' => $template->setSubject(
$this->l10n->t('%s has confirmed a meeting date', [$senderName])
)
};
// heading
Expand All @@ -508,13 +517,18 @@ private function sendEmailNotifications(IUser $user, ProposalObject $proposal, P
),
'D' => $template->addHeading(
$this->l10n->t('Dear %s, a proposed meeting has been cancelled', [$recipientName])
),
'F' => $template->addHeading(
$this->l10n->t('Dear %s, a meeting date has been confirmed', [$recipientName])
)
};
// buttons
$template->addBodyButton(
$this->l10n->t('Respond'),
$this->urlGenerator->linkToRouteAbsolute('Calendar.ProposalPublic.index', ['token' => $recipientToken])
);
if ($reason !== 'F') {
$template->addBodyButton(
$this->l10n->t('Respond'),
$this->urlGenerator->linkToRouteAbsolute('Calendar.ProposalPublic.index', ['token' => $recipientToken])
);
}
// description
if (!empty($proposal->getDescription())) {
$template->addBodyListItem($proposal->getDescription(), $this->l10n->t('Description:'));
Expand Down
Loading