diff options
| author | 2025-12-09 04:58:13 +0100 | |
|---|---|---|
| committer | 2025-12-09 04:58:13 +0100 | |
| commit | 4102a6a7ac7ab7c651fe0b03358148e8d15418cc (patch) | |
| tree | 9f8fe1daed0f20bf6f1c78318347851f86c12cb9 | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-4102a6a7ac7ab7c651fe0b03358148e8d15418cc.tar.gz snac2-4102a6a7ac7ab7c651fe0b03358148e8d15418cc.tar.xz snac2-4102a6a7ac7ab7c651fe0b03358148e8d15418cc.zip | |
make webpush use our notification server vkey instead of a random, ill-formated
key (necessary for some client notifications, such as moshidon)
Diffstat (limited to '')
| -rw-r--r-- | doc/snac.8 | 2 | ||||
| -rw-r--r-- | mastoapi.c | 5 |
2 files changed, 6 insertions, 1 deletions
| @@ -294,6 +294,8 @@ The URL to a favicon. If it's not set, the default one is used instead. | |||
| 294 | The maximum number of days an instance is considered down after continuous failed | 294 | The maximum number of days an instance is considered down after continuous failed |
| 295 | outgoing messages (default: 15). Anyway, whenever any incoming activity from a | 295 | outgoing messages (default: 15). Anyway, whenever any incoming activity from a |
| 296 | failed instance is detected, this counter is reset for it. | 296 | failed instance is detected, this counter is reset for it. |
| 297 | .It Ic vkey | ||
| 298 | Public vapid key. Used for notification on some client. | ||
| 297 | .El | 299 | .El |
| 298 | .Pp | 300 | .Pp |
| 299 | You must restart the server to make effective these changes. | 301 | You must restart the server to make effective these changes. |
| @@ -3044,7 +3044,10 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 3044 | xs *app = xs_dict_new(); | 3044 | xs *app = xs_dict_new(); |
| 3045 | xs *id = xs_replace_i(tid(0), ".", ""); | 3045 | xs *id = xs_replace_i(tid(0), ".", ""); |
| 3046 | xs *csec = random_str(); | 3046 | xs *csec = random_str(); |
| 3047 | xs *vkey = random_str(); | 3047 | char *vkey = (char *)xs_dict_get(srv_config, "vkey"); |
| 3048 | if (vkey == NULL) | ||
| 3049 | vkey = random_str(); | ||
| 3050 | |||
| 3048 | xs *cid = NULL; | 3051 | xs *cid = NULL; |
| 3049 | 3052 | ||
| 3050 | /* pick a non-existent random cid */ | 3053 | /* pick a non-existent random cid */ |