summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-10-17 11:28:44 +0200
committerdefault <nobody@localhost>2022-10-17 11:28:44 +0200
commit459ba627e673a5ec6cf17428bff951a45a663c35 (patch)
tree4e03bf70944212287becbf543a42717f242fcec4
parent54144dd517f9eb0687519e8188f8d93e5a55148c (diff)
Updated RELEASE_NOTES.
-rw-r--r--RELEASE_NOTES.md2
-rw-r--r--data.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 7a31e07..dec0b83 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -2,7 +2,7 @@
## 2.06
-The purge is managed internally, so there is no longer a need to add a cron job for that.
+The purge is managed internally, so there is no longer a need to add a cron job for that. If you don't want any timeline data to be purged, set `timeline_purge_days` to 0.
## 2.05
diff --git a/data.c b/data.c
index 92e7f45..e179fe3 100644
--- a/data.c
+++ b/data.c
@@ -1028,8 +1028,6 @@ void purge(snac *snac)
/* do the purge */
{
int tpd = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
- time_t mt = time(NULL) - tpd * 24 * 3600;
- char *p, *v;
/* purge days set to 0? disable purging */
if (tpd == 0) {
@@ -1037,8 +1035,10 @@ void purge(snac *snac)
return;
}
+ time_t mt = time(NULL) - tpd * 24 * 3600;
xs *t_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir);
xs *t_list = xs_glob(t_spec, 0, 0);
+ char *p, *v;
p = t_list;
while (xs_list_iter(&p, &v)) {