summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-10-14 10:18:15 +0200
committerdefault <nobody@localhost>2022-10-14 10:18:15 +0200
commit32046d5fc067bce540a2d3a858cfb00eb6721cbf (patch)
treed6d3e541b6aba2cddcb8612084b926af90cc12c8
parent72c63ba5b8cfd25331f03a97f2313587c534a6d7 (diff)
Don't overwrrite referrers.
-rw-r--r--data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/data.c b/data.c
index 7806bec..c6225e6 100644
--- 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 */