Skip to content

Commit b122544

Browse files
fix: send host confirmation email when approving pending bookings
Both confirm_booking (dashboard) and approve_booking_by_token (email link) were only sending the guest a confirmation email but never notifying the host. The host now receives a "New booking" email with ICS attachment after approving a pending booking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d6df0e0 commit b122544

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/web/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,9 @@ async fn confirm_booking(
14171417
guest_cancel_url.as_deref(),
14181418
)
14191419
.await;
1420+
1421+
// Also send host a confirmation email with ICS attachment
1422+
let _ = crate::email::send_host_notification(&smtp_config, &details).await;
14201423
}
14211424

14221425
Redirect::to("/dashboard/bookings").into_response()
@@ -6886,6 +6889,9 @@ async fn approve_booking_by_token(
68866889
guest_cancel_url.as_deref(),
68876890
)
68886891
.await;
6892+
6893+
// Also send host a confirmation email with ICS attachment
6894+
let _ = crate::email::send_host_notification(&smtp_config, &details).await;
68896895
}
68906896

68916897
let tmpl = match state.templates.get_template("booking_approved.html") {

0 commit comments

Comments
 (0)