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
Commit d5e89de
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/channels/synology-chat.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ title: "Synology Chat"
8
8
9
9
Synology Chat connects to OpenClaw through a webhook pair: a Synology Chat outgoing webhook posts inbound direct messages to the Gateway, and replies go back through a Synology Chat incoming webhook.
10
10
11
-
Status: official plugin, installed separately. Direct messages only; text and URL-based file sends are supported.
11
+
Status: official plugin, installed separately. Direct messages only; text and hosted file sends are supported.
Outbound text is chunked at 2000 characters. Media sends are supported by URL-based file delivery: the NAS downloads and attaches the file (max 32 MB). Outbound file URLs must use `http` or `https`, and private or otherwise blocked network targets are rejected before OpenClaw forwards the URL to the NAS webhook.
116
+
Outbound text is chunked at 2000 characters, and ordinary links remain intact. Keep **Hide URL previews in conversations and channels** enabled in Synology Chat Admin Console on a supported Chat Server release.
117
+
118
+
For attachments, OpenClaw loads the source under its guarded outbound-media policy, freezes the resulting bytes in bounded plugin-scoped SQLite state, and gives Synology a short-lived opaque HTTPS capability on the configured webhook route. The NAS receives only this OpenClaw-hosted URL, never the original remote or local media reference. Capabilities are account- and route-scoped, reusable for delayed `GET` or `HEAD` requests during their ten-minute lifetime, and expire automatically. Files are limited to 32 MB. Each account can serve at most four attachment responses concurrently and 128 MB per minute; stalled responses are closed after two minutes. Byte-range responses are not advertised.
119
+
120
+
`webhookUrl` and `webhookPath` have different roles:
121
+
122
+
-`webhookUrl` is the exact externally reachable HTTPS callback configured in Synology Chat. OpenClaw uses its public origin, path, and existing query string when creating attachment capabilities.
123
+
-`webhookPath` is the internal Gateway route. A reverse proxy may map the public URL to this route, but should expose only this plugin path, not the general Gateway HTTP surface.
124
+
-`incomingUrl` points in the opposite direction: OpenClaw uses it to post replies to the NAS.
125
+
126
+
OpenClaw never derives the public URL from `Host` or `X-Forwarded-*` headers and never falls back to forwarding the original source URL. If `webhookUrl` is missing or invalid, inbound messages and outbound text continue to work, while attachment sends fail with an actionable setup error.
115
127
116
128
## Multi-account
117
129
118
130
Multiple Synology Chat accounts are supported under `channels.synology-chat.accounts`.
119
-
Each account can override token, incoming URL, webhook path, DM policy, and limits.
131
+
Each account can override token, incoming URL, public webhook URL, webhook path, DM policy, and limits.
120
132
Direct-message sessions are isolated per account and user, so the same numeric `user_id`
121
133
on two different Synology accounts does not share transcript state.
122
134
Give each enabled account a distinct `webhookPath`. OpenClaw rejects duplicate exact paths
@@ -134,10 +146,12 @@ but duplicate exact paths are still rejected fail-closed. Prefer explicit per-ac
@@ -158,6 +172,8 @@ but duplicate exact paths are still rejected fail-closed. Prefer explicit per-ac
158
172
- Prefer `dmPolicy: "allowlist"` for production.
159
173
- Keep `dangerouslyAllowNameMatching` off unless you explicitly need legacy username-based reply delivery.
160
174
- Keep `dangerouslyAllowInheritedWebhookPath` off unless you explicitly accept shared-path routing risk in a multi-account setup.
175
+
- Reverse-proxy access logs can capture attachment capability tokens. Disable query-string logging or redact `__openclaw_synology_media_token_*` parameters, and keep application logs free of full capability URLs.
176
+
- Hosted attachments use `Content-Disposition: attachment`, `X-Content-Type-Options: nosniff`, and `Cache-Control: no-store`. Files declared or named as HTML, SVG, or XML are rejected. Frozen bytes that begin as a UTF-8, UTF-16, or UTF-32 markup document after an optional encoding marker, whitespace, and comments are also rejected; literal tags later in passive text or source files do not make those files active documents.
161
177
162
178
## Troubleshooting
163
179
@@ -175,6 +191,10 @@ but duplicate exact paths are still rejected fail-closed. Prefer explicit per-ac
175
191
-`dmPolicy="allowlist"` is enabled but no users are configured
176
192
-`User not authorized`:
177
193
- the sender's numeric `user_id` is not in `allowedUserIds`
194
+
-`Synology Chat attachments require webhookUrl`:
195
+
- set the account's exact externally reachable HTTPS outgoing-webhook callback URL
196
+
- confirm the reverse proxy maps only that public route to `webhookPath`
197
+
- text and inbound messaging remain available while attachment setup is incomplete
0 commit comments