snac2

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

commit 32046d5fc067bce540a2d3a858cfb00eb6721cbf
parent 72c63ba5b8cfd25331f03a97f2313587c534a6d7
Author: default <nobody@localhost>
Date:   Fri, 14 Oct 2022 10:18:15 +0200

Don't overwrrite referrers.

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

diff --git a/data.c b/data.c @@ -586,8 +586,8 @@ void timeline_admire(snac *snac, char *id, char *admirer, int like) if (xs_list_in(list, admirer) == -1) list = xs_list_append(list, admirer); - /* set the admirer as the referrer */ - if (!like) + /* set the admirer as the referrer (if not already set) */ + if (!like && xs_is_null(xs_dict_get(meta, "referrer"))) meta = xs_dict_set(meta, "referrer", admirer); /* re-store */