summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-03-12 18:04:09 +0100
committerdefault <nobody@localhost>2024-03-12 18:04:09 +0100
commitcd0e211354575f89f169da2e86b5b234a2624b9d (patch)
treebc681f26bd01436c1fdf06ca3cc74a941d234d37 /data.c
parentf485dbdaf0f6372b9815be3d78ae2839e80d6946 (diff)
Don't call enqueue_actor_request() with a NULL user.
Diffstat (limited to 'data.c')
-rw-r--r--data.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/data.c b/data.c
index 77d81d5..3da25f1 100644
--- a/data.c
+++ b/data.c
@@ -811,6 +811,16 @@ double object_mtime(const char *id)
}
+void object_touch(const char *id)
+{
+ xs *md5 = xs_md5_hex(id, strlen(id));
+ xs *fn = _object_fn_by_md5(md5, "object_touch");
+
+ if (mtime(fn))
+ utimes(fn, NULL);
+}
+
+
xs_str *_object_index_fn(const char *id, const char *idxsfx)
/* returns the filename of an object's index */
{
@@ -1586,7 +1596,7 @@ int actor_get_refresh(snac *user, const char *actor, xs_dict **data)
{
int status = actor_get(actor, data);
- if (status == 205)
+ if (status == 205 && user && !xs_startswith(user->actor, srv_baseurl))
enqueue_actor_request(user, actor);
return status;