# Notification Templates

Dual-channel message templates for booking notifications.

**Critical**: Telegram uses HTML, Pushover uses plain text. Build in HTML first, then strip for Pushover using `stripHtmlForPushover()`.

## Channel Differences

| Aspect   | Telegram               | Pushover               |
| -------- | ---------------------- | ---------------------- |
| Format   | HTML (`parse_mode`)    | Plain text only        |
| Bold     | `<b>text</b>`          | UPPERCASE or _text_    |
| Strike   | `<s>text</s>`          | ~~text~~               |
| Newline  | `\n`                   | `\n`                   |
| Priority | N/A (always delivered) | 0=normal, 1=high, 2=EM |

---

## Telegram Templates (HTML)

## New Booking

```html
<b>New Booking</b> <b>Event:</b> {{eventTitle}}
<b>Attendee:</b> {{attendeeName}} ({{attendeeEmail}}) <b>When:</b> {{startTime}}
- {{endTime}} <b>Timezone:</b> {{timezone}} {{#if notes}}<b>Notes:</b>
{{notes}}{{/if}}
```

## Cancellation

```html
<b>Booking Cancelled</b> <b>Event:</b> {{eventTitle}}
<b>Attendee:</b> {{attendeeName}} <b>Was scheduled:</b> {{startTime}} {{#if
cancellationReason}}<b>Reason:</b> {{cancellationReason}}{{/if}}
```

## Upcoming Reminder

```html
<b>Upcoming in {{minutesUntil}} min</b> <b>Event:</b> {{eventTitle}}
<b>With:</b> {{attendeeName}} <b>Time:</b> {{startTime}} - {{endTime}}
```

## Rescheduled

```html
<b>Booking Rescheduled</b> <b>Event:</b> {{eventTitle}}
<b>Attendee:</b> {{attendeeName}} <b>Old time:</b> <s>{{oldStartTime}}</s>
<b>New time:</b> {{newStartTime}} - {{newEndTime}}
```

## Daily Summary

```html
<b>Today's Bookings ({{count}})</b> {{#each bookings}} {{time}} — {{title}} with
{{attendee}} {{/each}}
```

## Emoji Map

| Category     | Emoji |
| ------------ | ----- |
| NEW BOOKING  | 📅    |
| CANCELLATION | ❌    |
| UPCOMING     | ⏰    |
| RESCHEDULED  | 🔄    |
| DAILY        | 📋    |

---

## Pushover Templates (Plain Text)

These are auto-generated by `stripHtmlForPushover()` from the HTML templates above. For reference:

### New Booking (Pushover)

```
NEW BOOKING
Event: {{eventTitle}}
Attendee: {{attendeeName}} ({{attendeeEmail}})
When: {{startTime}} - {{endTime}}
Timezone: {{timezone}}
```

Priority: **2 (Emergency)** — requires acknowledge, "dune" sound, retry every 30s for 5 min.

### Cancellation (Pushover)

```
BOOKING CANCELLED
Event: {{eventTitle}}
Attendee: {{attendeeName}}
Was scheduled: {{startTime}}
```

Priority: **0 (Normal)** — "dune" sound, respects quiet hours.

### Upcoming Reminder (Pushover)

```
UPCOMING IN {{minutesUntil}} MIN
Event: {{eventTitle}}
With: {{attendeeName}}
Time: {{startTime}} - {{endTime}}
```

Priority: **1 (High)** — bypasses quiet hours.

### Rescheduled (Pushover)

```
BOOKING RESCHEDULED
Event: {{eventTitle}}
Attendee: {{attendeeName}}
Old time: {{oldStartTime}}
New time: {{newStartTime}} - {{newEndTime}}
```

Priority: **2 (Emergency)** — requires acknowledge.
