diff options
| author | 2024-03-02 07:12:11 +0100 | |
|---|---|---|
| committer | 2024-03-02 07:12:11 +0100 | |
| commit | d65951622efa1e7ebd71cb5cd3310d9a3098adf5 (patch) | |
| tree | 0484e66d657d147079ef447f620d9d04173e583c | |
| parent | Don't show the :shortname: as a title tag. (diff) | |
| download | snac2-d65951622efa1e7ebd71cb5cd3310d9a3098adf5.tar.gz snac2-d65951622efa1e7ebd71cb5cd3310d9a3098adf5.tar.xz snac2-d65951622efa1e7ebd71cb5cd3310d9a3098adf5.zip | |
Fixed incorrect link to booster.
| -rw-r--r-- | html.c | 12 |
1 files changed, 10 insertions, 2 deletions
| @@ -1450,11 +1450,19 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1450 | 1450 | ||
| 1451 | if (!xs_is_null(name)) { | 1451 | if (!xs_is_null(name)) { |
| 1452 | xs *href = NULL; | 1452 | xs *href = NULL; |
| 1453 | char *id = xs_dict_get(actor_r, "id"); | ||
| 1454 | int fwers = 0; | ||
| 1455 | int fwing = 0; | ||
| 1453 | 1456 | ||
| 1454 | if (!read_only && user != NULL) | 1457 | if (user != NULL) { |
| 1458 | fwers = follower_check(user, id); | ||
| 1459 | fwing = following_check(user, id); | ||
| 1460 | } | ||
| 1461 | |||
| 1462 | if (!read_only && (fwers || fwing)) | ||
| 1455 | href = xs_fmt("%s/people#%s", user->actor, p); | 1463 | href = xs_fmt("%s/people#%s", user->actor, p); |
| 1456 | else | 1464 | else |
| 1457 | href = xs_dup(xs_dict_get(actor_r, "id")); | 1465 | href = xs_dup(id); |
| 1458 | 1466 | ||
| 1459 | xs_html_add(post_header, | 1467 | xs_html_add(post_header, |
| 1460 | xs_html_tag("div", | 1468 | xs_html_tag("div", |