commit 4102a6a
violette p.
·
2025-12-09 03:58:13 +0000 UTC
parent c741c30
make webpush use our notification server vkey instead of a random, ill-formated key (necessary for some client notifications, such as moshidon)
2 files changed,
+6,
-1
+2,
-0
1@@ -294,6 +294,8 @@ The URL to a favicon. If it's not set, the default one is used instead.
2 The maximum number of days an instance is considered down after continuous failed
3 outgoing messages (default: 15). Anyway, whenever any incoming activity from a
4 failed instance is detected, this counter is reset for it.
5+.It Ic vkey
6+Public vapid key. Used for notification on some client.
7 .El
8 .Pp
9 You must restart the server to make effective these changes.
+4,
-1
1@@ -3044,7 +3044,10 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
2 xs *app = xs_dict_new();
3 xs *id = xs_replace_i(tid(0), ".", "");
4 xs *csec = random_str();
5- xs *vkey = random_str();
6+ char *vkey = (char *)xs_dict_get(srv_config, "vkey");
7+ if (vkey == NULL)
8+ vkey = random_str();
9+
10 xs *cid = NULL;
11
12 /* pick a non-existent random cid */