commit d659516

default  ·  2024-03-02 06:12:11 +0000 UTC
parent 1ac162c
Fixed incorrect link to booster.
1 files changed,  +10, -2
M html.c
M html.c
+10, -2
 1@@ -1450,11 +1450,19 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
 2 
 3             if (!xs_is_null(name)) {
 4                 xs *href = NULL;
 5+                char *id = xs_dict_get(actor_r, "id");
 6+                int fwers = 0;
 7+                int fwing = 0;
 8 
 9-                if (!read_only && user != NULL)
10+                if (user != NULL) {
11+                    fwers = follower_check(user, id);
12+                    fwing = following_check(user, id);
13+                }
14+
15+                if (!read_only && (fwers || fwing))
16                     href = xs_fmt("%s/people#%s", user->actor, p);
17                 else
18-                    href = xs_dup(xs_dict_get(actor_r, "id"));
19+                    href = xs_dup(id);
20 
21                 xs_html_add(post_header,
22                     xs_html_tag("div",