From 4272f58e3f1ebc4d0759589e703a0269fdbe0ce4 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 31 Oct 2022 11:56:20 +0100 Subject: [PATCH] Always set the referrer if it's the user. --- data.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data.c b/data.c index 32727a7..5e1be8e 100644 --- a/data.c +++ b/data.c @@ -600,8 +600,9 @@ 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 not already set) */ - if (!like && xs_is_null(xs_dict_get(meta, "referrer"))) + /* set the admirer as the referrer (if not already set or it's us) */ + if (!like && (xs_is_null(xs_dict_get(meta, "referrer")) || + strcmp(admirer, snac->actor) == 0)) meta = xs_dict_set(meta, "referrer", admirer); /* re-store */