mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-29 07:53:37 +00:00
Always set the referrer if it's the user.
This commit is contained in:
parent
81d8923768
commit
4272f58e3f
1 changed files with 3 additions and 2 deletions
5
data.c
5
data.c
|
@ -600,8 +600,9 @@ void timeline_admire(snac *snac, char *id, char *admirer, int like)
|
||||||
if (xs_list_in(list, admirer) == -1)
|
if (xs_list_in(list, admirer) == -1)
|
||||||
list = xs_list_append(list, admirer);
|
list = xs_list_append(list, admirer);
|
||||||
|
|
||||||
/* set the admirer as the referrer (if not already set) */
|
/* set the admirer as the referrer (if not already set or it's us) */
|
||||||
if (!like && xs_is_null(xs_dict_get(meta, "referrer")))
|
if (!like && (xs_is_null(xs_dict_get(meta, "referrer")) ||
|
||||||
|
strcmp(admirer, snac->actor) == 0))
|
||||||
meta = xs_dict_set(meta, "referrer", admirer);
|
meta = xs_dict_set(meta, "referrer", admirer);
|
||||||
|
|
||||||
/* re-store */
|
/* re-store */
|
||||||
|
|
Loading…
Reference in a new issue