snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 8a71e2e557af62c9d3c89b519c4e98dd26dbc859
parent 694ae655cb7a6cf1c08bef3ac7d3811d66b08b05
Author: default <nobody@localhost>
Date:   Thu, 24 Nov 2022 13:15:32 +0100

Only log the object_admire() if it's new.

Diffstat:
Mdata.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/data.c b/data.c @@ -503,11 +503,12 @@ int object_admire(const char *id, const char *actor, int like) fn = xs_replace_i(fn, ".json", like ? "_l.idx" : "_a.idx"); - srv_debug(0, xs_fmt("object_admire (%s) %s %s", like ? "Like" : "Announce", actor, fn)); - - if (!index_in(fn, actor)) + if (!index_in(fn, actor)) { status = index_add(fn, actor); + srv_debug(0, xs_fmt("object_admire (%s) %s %s", like ? "Like" : "Announce", actor, fn)); + } + return status; }