commit a136f75

grunfink  ·  2025-06-01 15:07:23 +0000 UTC
parent 955b591
Updated documentation.
1 files changed,  +16, -3
+16, -3
 1@@ -417,11 +417,24 @@ https://$SNAC_HOST/oauth/x-snac-get-token
 2 .Ss Webhook for notifications
 3 Since version 2.78, users can set the URL to a webhook that will receive
 4 an HTTP POST with every notification (in JSON format). This can be used to
 5-implement some automation whenever a new activity happens, like autorepliers
 6-or chatbots or whatever. The
 7+implement some automation whenever a new activity happens, like autorepliers,
 8+chatbots, interactive textual games or whatever. The
 9 .Pa examples/
10 subdirectory contains a tiny Python program that implements an auto-follower
11-for every new follow.
12+for every new follow. The JSON notification object includes the following data:
13+.Bd -literal -offset indent
14+id: a unique notification identifier
15+actor: the origin actor id
16+target: the target actor id
17+date: the notification date
18+message: the full ActivityPub action JSON object
19+objid: the object identifier (extracted from message, may be null)
20+type: the action type (extracted from message)
21+utype: the action subtype (extracted from message, may be null)
22+uid: the user identifier (account name)
23+basedir: the server base directory
24+baseurl: the server base URL
25+.Ed
26 .Pp
27 .Sh ENVIRONMENT
28 .Bl -tag -width Ds