summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-03-02 07:12:11 +0100
committerdefault <nobody@localhost>2024-03-02 07:12:11 +0100
commitd65951622efa1e7ebd71cb5cd3310d9a3098adf5 (patch)
tree0484e66d657d147079ef447f620d9d04173e583c /html.c
parent1ac162ce434b20729fd2d563fb0f71c776db4ebf (diff)
Fixed incorrect link to booster.
Diffstat (limited to 'html.c')
-rw-r--r--html.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/html.c b/html.c
index 3e27b70..8a21986 100644
--- a/html.c
+++ b/html.c
@@ -1450,11 +1450,19 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
if (!xs_is_null(name)) {
xs *href = NULL;
+ char *id = xs_dict_get(actor_r, "id");
+ int fwers = 0;
+ int fwing = 0;
- if (!read_only && user != NULL)
+ if (user != NULL) {
+ fwers = follower_check(user, id);
+ fwing = following_check(user, id);
+ }
+
+ if (!read_only && (fwers || fwing))
href = xs_fmt("%s/people#%s", user->actor, p);
else
- href = xs_dup(xs_dict_get(actor_r, "id"));
+ href = xs_dup(id);
xs_html_add(post_header,
xs_html_tag("div",