diff options
author | default <nobody@localhost> | 2024-03-12 18:04:09 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-03-12 18:04:09 +0100 |
commit | cd0e211354575f89f169da2e86b5b234a2624b9d (patch) | |
tree | bc681f26bd01436c1fdf06ca3cc74a941d234d37 /data.c | |
parent | f485dbdaf0f6372b9815be3d78ae2839e80d6946 (diff) |
Don't call enqueue_actor_request() with a NULL user.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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; |