mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Renamed object_user_cache() to object_user_cache_add().
This commit is contained in:
parent
405bf6b8e4
commit
f403d6f8d3
1 changed files with 5 additions and 3 deletions
8
data.c
8
data.c
|
@ -464,6 +464,8 @@ int _object_add(const char *id, d_char *obj, int ow)
|
||||||
/* create a one-element index with the parent */
|
/* create a one-element index with the parent */
|
||||||
xs *p_idx = xs_replace(fn, ".json", "_p.idx");
|
xs *p_idx = xs_replace(fn, ".json", "_p.idx");
|
||||||
index_add(p_idx, in_reply_to);
|
index_add(p_idx, in_reply_to);
|
||||||
|
|
||||||
|
srv_debug(0, xs_fmt("object_add added parent %s to %s", in_reply_to, p_idx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -554,7 +556,7 @@ int object_admire(const char *id, const char *actor, int like)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int object_user_cache(snac *snac, const char *id, const char *cachedir)
|
int object_user_cache_add(snac *snac, const char *id, const char *cachedir)
|
||||||
/* caches an object into a user cache */
|
/* caches an object into a user cache */
|
||||||
{
|
{
|
||||||
xs *ofn = _object_fn(id);
|
xs *ofn = _object_fn(id);
|
||||||
|
@ -944,14 +946,14 @@ void timeline_update_indexes(snac *snac, const char *id)
|
||||||
xs *idx = xs_fmt("%s/private.idx", snac->basedir);
|
xs *idx = xs_fmt("%s/private.idx", snac->basedir);
|
||||||
index_add(idx, id);
|
index_add(idx, id);
|
||||||
|
|
||||||
object_user_cache(snac, id, "private");
|
object_user_cache_add(snac, id, "private");
|
||||||
|
|
||||||
if (xs_startswith(id, snac->actor)) {
|
if (xs_startswith(id, snac->actor)) {
|
||||||
/* add to the public index */
|
/* add to the public index */
|
||||||
idx = xs_replace_i(idx, "private", "public");
|
idx = xs_replace_i(idx, "private", "public");
|
||||||
index_add(idx, id);
|
index_add(idx, id);
|
||||||
|
|
||||||
object_user_cache(snac, id, "public");
|
object_user_cache_add(snac, id, "public");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue