From a72d09ae56b927b872540fec5c85881496c23e27 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 24 Jan 2025 08:23:18 +0100 Subject: Set value 'purge_days' to 1 by default when creating the relay user. --- utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utils.c') diff --git a/utils.c b/utils.c index a5b1124..fd00e99 100644 --- a/utils.c +++ b/utils.c @@ -318,6 +318,10 @@ int adduser(const char *uid) mkdirx(d); } + /* add a specially short data retention time for the relay */ + if (strcmp(uid, "relay") == 0) + config = xs_dict_set(config, "purge_days", xs_stock(1)); + xs *cfn = xs_fmt("%s/user.json", basedir); if ((f = fopen(cfn, "w")) == NULL) { -- cgit v1.2.3