fix(FN-4127): harden ntfy notification delivery

- Fall back to ntfy JSON publish requests for unicode titles/messages while preserving auth and click metadata
- Truncate ntfy titles and UTF-8 message bodies to documented limits without splitting surrogate pairs
- Extend notifier and provider tests to cover unicode mailbox events, truncation, and end-to-end message notification delivery
- Document the ntfy encoding/truncation behavior and add a patch changeset for @runfusion/fusion

Fusion-Task-Id: FN-4127
This commit is contained in:
Fusion
2026-05-12 09:41:21 -07:00
committed by gsxdsm
parent 83a1a98f17
commit 6709703411
7 changed files with 266 additions and 23 deletions

View File

@@ -48,6 +48,8 @@ Defaults from `DEFAULT_GLOBAL_SETTINGS`; key scope from `GLOBAL_SETTINGS_KEYS`.
| `webhookEnabled` | `boolean` | `false` | Enable webhook notifications for task lifecycle events. Part of the legacy flat settings; prefer `notificationProviders` for new setups. |
In **Settings → Notifications**, use **Test message notification** to exercise the full mailbox-message dispatch pipeline (`NotificationService.dispatch` → provider delivery), not just a raw ntfy POST.
Fusion automatically falls back to ntfy's JSON publish format when a notification title or message contains non-Latin-1 characters, and truncates outgoing titles/messages to ntfy's documented size limits before sending.
| `webhookUrl` | `string` | `undefined` | Webhook endpoint URL. Must be `http://` or `https://`. Part of legacy flat settings. |
| `webhookFormat` | `"slack" \| "discord" \| "generic"` | `"generic"` | Webhook payload format. Part of legacy flat settings. |
| `webhookEvents` | `string[]` | `[]` | Event filter for webhook notifications. Empty/omitted means all events. Part of legacy flat settings. |