From a779434bab30b1fa4fa5b0eefec9d61e02b1c4ea Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Thu, 21 Apr 2022 09:58:28 -0400 Subject: [PATCH] More docs --- docs/publish.md | 838 +++++++++++++++--- go.mod | 27 +- go.sum | 35 + server/message_cache.go | 20 +- server/util.go | 14 +- server/util_test.go | 18 + web/package-lock.json | 1869 ++++++++++++++++++++------------------- 7 files changed, 1776 insertions(+), 1045 deletions(-) diff --git a/docs/publish.md b/docs/publish.md index 4c829fe..76d9010 100644 --- a/docs/publish.md +++ b/docs/publish.md @@ -821,11 +821,13 @@ Here's an example of what that a notification with actions can look like:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-To define the user actions, you can either pass the `actions` field as part of the JSON body (if you're -[publishing via JSON](#publish-as-json)), or use the `X-Actions` header (or any of its aliases: `Actions`, `Action`). +You can set up to three user actions in your notifications, using either of the following methods: -Using the `X-Actions` header and the **simple format** (details see below), you can create the above notification like -this. This format is much **easier to write, but less powerful**: +* In the `X-Actions` header, using the **simple format** +* As a **JSON array** in the `actions` key, when [publishing as JSON](#publish-as-json) + +Using the `X-Actions` header (or any of its aliases: `Actions`, `Action`) and the **simple format** (details see below), you +can create the above notification like this. === "Command line (curl)" ``` @@ -899,40 +901,29 @@ this. This format is much **easier to write, but less powerful**: ] ])); ``` - -The `X-Actions` header (including above-mentioned aliases) supports the following formats: + +Here's the generic definition of the simple format: === "Simple format (long)" ``` - X-Actions: action=, label=