docs(wiki): document the plugin notification-channel surface

Covers the pieces added in the previous commits, in the pages a reader would
actually reach for:

- Plugins.md (the admin-facing page) had none of it: notification channels,
  settings actions, and a full "Allowed hosts" section — including what
  operator-supplied egress deliberately does NOT let anyone do.
- Plugin-Development.md: the notificationChannel hook (and why it is the one hook
  with no acting user), settings-page actions, operatorEgress, and the manifest
  reference rows.
- Plugin-Cookbook.md: a "become a notification channel" recipe and a
  "Test connection button" recipe.
- Plugin-Permissions.md: hook:notification-channel, operatorEgress under the
  outbound section, and settings actions under "not a permission".
- Notifications.md: plugin channels alongside the four built-ins.
This commit is contained in:
jubnl
2026-07-11 19:27:02 +02:00
parent c9627af239
commit a4972f8f13
5 changed files with 358 additions and 3 deletions
+20 -1
View File
@@ -8,7 +8,7 @@ The Notifications tab (Settings → Notifications) lets you choose which events
## Notification channels
TREK supports four delivery channels. Which channels appear depends on what the admin has enabled server-side.
TREK ships four delivery channels, and a plugin can add more. Which channels appear depends on what the admin has enabled server-side.
| Channel | Description |
|---------|-------------|
@@ -17,6 +17,25 @@ TREK supports four delivery channels. Which channels appear depends on what the
| **Webhook** | TREK POSTs a JSON payload to a URL you specify. Discord and Slack webhook URLs are auto-detected and receive a natively formatted payload. |
| **ntfy** | Push notifications via [ntfy.sh](https://ntfy.sh) or a self-hosted ntfy server. |
### Plugin channels
A plugin can register an **additional channel** — Gotify, Pushover, Telegram, anything that
takes a message — by implementing the `notificationChannel` hook. See
[Plugin-Development](Plugin-Development.md#notification-channels).
Once the admin installs the plugin and switches its channel on, it appears as a new column in
the preferences matrix beside Email and In-App, and behaves like any other channel: each user
supplies their own credentials (in the plugin's own settings) and picks per-event which
notifications they want on it.
Two things are true of plugin channels specifically:
- **They are user-scoped.** Admin-only events (like `version_available`) always go out over the
built-in admin channels, never a plugin's.
- **The plugin never sees your trips.** The notification is rendered by TREK — in your language,
with the deep link already built — before the plugin is handed it. The plugin gets that message
and your own credentials for its service, and nothing else.
## Notification events
The following events are configurable in user settings: