mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 22:45:05 +00:00
Use the _a.json extension for actor object links into following/.
This commit is contained in:
parent
297b82c9c6
commit
2bed69d00b
1 changed files with 3 additions and 3 deletions
6
data.c
6
data.c
|
@ -1174,7 +1174,7 @@ int following_add(snac *snac, const char *actor, const xs_dict *msg)
|
||||||
xs *actor_fn = _object_fn(actor);
|
xs *actor_fn = _object_fn(actor);
|
||||||
|
|
||||||
/* increase its reference count */
|
/* increase its reference count */
|
||||||
fn = xs_replace_i(fn, ".json", "");
|
fn = xs_replace_i(fn, ".json", "_a.json");
|
||||||
link(actor_fn, fn);
|
link(actor_fn, fn);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1196,7 +1196,7 @@ int following_del(snac *snac, const char *actor)
|
||||||
unlink(fn);
|
unlink(fn);
|
||||||
|
|
||||||
/* also delete the reference to the author */
|
/* also delete the reference to the author */
|
||||||
fn = xs_replace_i(fn, ".json", "");
|
fn = xs_replace_i(fn, ".json", "_a.json");
|
||||||
unlink(fn);
|
unlink(fn);
|
||||||
|
|
||||||
return 200;
|
return 200;
|
||||||
|
@ -1265,7 +1265,7 @@ xs_list *following_list(snac *snac)
|
||||||
list = xs_list_append(list, actor);
|
list = xs_list_append(list, actor);
|
||||||
|
|
||||||
/* check if there is a link to the actor object */
|
/* check if there is a link to the actor object */
|
||||||
xs *v2 = xs_replace(v, ".json", "");
|
xs *v2 = xs_replace(v, ".json", "_a.json");
|
||||||
|
|
||||||
if (mtime(v2) == 0.0) {
|
if (mtime(v2) == 0.0) {
|
||||||
/* no; add a link to it */
|
/* no; add a link to it */
|
||||||
|
|
Loading…
Reference in a new issue