You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Host cancellation emails always say "cancelled by admin" #90
Repro: log in as a non-admin host, create availability + event types, make a test booking, cancel it from the bookings page. The cancellation email says Reason: cancelled by admin, even though an ordinary team member cancelled.
Root cause: frontend/src/routes/bookings/+page.svelte hardcodes { reason: "cancelled by admin" }, the backend (POST /v1/bookings/{id}/cancel, CancelBooking in internal/handler/booking_handler.go) stores it verbatim, and the mailer prints it.
Fix: attribute server-side. AuthUser already carries Name/Email/Role() — compose the reason in CancelBooking (e.g. Cancelled by {name}) instead of trusting the client string. Booker manage-link cancels and system cancels (unpaid expiry) are unaffected.
Fixed on main. The bookings page sent a hardcoded "cancelled by admin" string that the server stored verbatim, so every member cancel emailed as an admin cancel. The server now composes the reason itself - "Cancelled by {name}" - from the authenticated caller, and ignores the client string. Booker cancels via manage links and system cancels are untouched.
Activity
pullfrog commentedon Sep 22, 2026
fix(cancel): attribute cancellations server-side (#90)
shockalotti commentedon Sep 26, 2026
Fixed on main. The bookings page sent a hardcoded "cancelled by admin" string that the server stored verbatim, so every member cancel emailed as an admin cancel. The server now composes the reason itself - "Cancelled by {name}" - from the authenticated caller, and ignores the client string. Booker cancels via manage links and system cancels are untouched.