commit a72d09a

default  ·  2025-01-24 07:23:18 +0000 UTC
parent 3f3419d
Set value 'purge_days' to 1 by default when creating the relay user.
1 files changed,  +4, -0
+4, -0
 1@@ -318,6 +318,10 @@ int adduser(const char *uid)
 2         mkdirx(d);
 3     }
 4 
 5+    /* add a specially short data retention time for the relay */
 6+    if (strcmp(uid, "relay") == 0)
 7+        config = xs_dict_set(config, "purge_days", xs_stock(1));
 8+
 9     xs *cfn = xs_fmt("%s/user.json", basedir);
10 
11     if ((f = fopen(cfn, "w")) == NULL) {