diff options
| author | 2025-06-01 17:07:23 +0200 | |
|---|---|---|
| committer | 2025-06-01 17:07:23 +0200 | |
| commit | a136f7533d223865adec2a0794b9c290be631290 (patch) | |
| tree | 537302213763bb9ee85f2bff8d24528ca33646ea | |
| parent | Updated documentation. (diff) | |
| download | penes-snac2-a136f7533d223865adec2a0794b9c290be631290.tar.gz penes-snac2-a136f7533d223865adec2a0794b9c290be631290.tar.xz penes-snac2-a136f7533d223865adec2a0794b9c290be631290.zip | |
Updated documentation.
| -rw-r--r-- | doc/snac.1 | 19 |
1 files changed, 16 insertions, 3 deletions
| @@ -417,11 +417,24 @@ https://$SNAC_HOST/oauth/x-snac-get-token | |||
| 417 | .Ss Webhook for notifications | 417 | .Ss Webhook for notifications |
| 418 | Since version 2.78, users can set the URL to a webhook that will receive | 418 | Since version 2.78, users can set the URL to a webhook that will receive |
| 419 | an HTTP POST with every notification (in JSON format). This can be used to | 419 | an HTTP POST with every notification (in JSON format). This can be used to |
| 420 | implement some automation whenever a new activity happens, like autorepliers | 420 | implement some automation whenever a new activity happens, like autorepliers, |
| 421 | or chatbots or whatever. The | 421 | chatbots, interactive textual games or whatever. The |
| 422 | .Pa examples/ | 422 | .Pa examples/ |
| 423 | subdirectory contains a tiny Python program that implements an auto-follower | 423 | subdirectory contains a tiny Python program that implements an auto-follower |
| 424 | for every new follow. | 424 | for every new follow. The JSON notification object includes the following data: |
| 425 | .Bd -literal -offset indent | ||
| 426 | id: a unique notification identifier | ||
| 427 | actor: the origin actor id | ||
| 428 | target: the target actor id | ||
| 429 | date: the notification date | ||
| 430 | message: the full ActivityPub action JSON object | ||
| 431 | objid: the object identifier (extracted from message, may be null) | ||
| 432 | type: the action type (extracted from message) | ||
| 433 | utype: the action subtype (extracted from message, may be null) | ||
| 434 | uid: the user identifier (account name) | ||
| 435 | basedir: the server base directory | ||
| 436 | baseurl: the server base URL | ||
| 437 | .Ed | ||
| 425 | .Pp | 438 | .Pp |
| 426 | .Sh ENVIRONMENT | 439 | .Sh ENVIRONMENT |
| 427 | .Bl -tag -width Ds | 440 | .Bl -tag -width Ds |