Skip to content

Commit e02ef07

Browse files
committed
Docs: clarify Matrix quiet push rules
1 parent 27d507e commit e02ef07

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

docs/channels/matrix.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ OpenClaw marks finalized text-only preview edits with:
281281

282282
```bash
283283
curl -sS -X PUT \
284-
"https://matrix.example.org/_matrix/client/v3/pushrules/global/override/openclaw-finalized-preview" \
284+
"https://matrix.example.org/_matrix/client/v3/pushrules/global/override/openclaw-finalized-preview-botname" \
285285
-H "Authorization: Bearer $USER_ACCESS_TOKEN" \
286286
-H "Content-Type: application/json" \
287287
--data '{
@@ -311,8 +311,15 @@ Replace these values before you run the command:
311311

312312
- `https://matrix.example.org`: your homeserver base URL
313313
- `$USER_ACCESS_TOKEN`: the receiving user's access token
314+
- `openclaw-finalized-preview-botname`: a rule ID unique to this bot for this receiving user
314315
- `@bot:example.org`: your OpenClaw Matrix bot MXID, not the receiving user's MXID
315316

317+
Important for multi-bot setups:
318+
319+
- Push rules are keyed by `ruleId`. Re-running `PUT` against the same rule ID updates that one rule.
320+
- If one receiving user should notify for multiple OpenClaw Matrix bot accounts, create one rule per bot with a unique rule ID for each sender match.
321+
- A simple pattern is `openclaw-finalized-preview-<botname>`, such as `openclaw-finalized-preview-ops` or `openclaw-finalized-preview-support`.
322+
316323
The rule is evaluated against the event sender:
317324

318325
- authenticate with the receiving user's token
@@ -323,12 +330,20 @@ The rule is evaluated against the event sender:
323330
```bash
324331
curl -sS \
325332
-H "Authorization: Bearer $USER_ACCESS_TOKEN" \
326-
"https://matrix.example.org/_matrix/client/v3/pushrules/global/override/openclaw-finalized-preview"
333+
"https://matrix.example.org/_matrix/client/v3/pushrules/global/override/openclaw-finalized-preview-botname"
327334
```
328335

329336
7. Test a streamed reply. In quiet mode, the room should show a quiet draft preview and the final
330337
in-place edit should notify once the block or turn finishes.
331338

339+
If you need to remove the rule later, delete that same rule ID with the receiving user's token:
340+
341+
```bash
342+
curl -sS -X DELETE \
343+
-H "Authorization: Bearer $USER_ACCESS_TOKEN" \
344+
"https://matrix.example.org/_matrix/client/v3/pushrules/global/override/openclaw-finalized-preview-botname"
345+
```
346+
332347
Notes:
333348

334349
- Create the rule with the receiving user's access token, not the bot's.

0 commit comments

Comments
 (0)