commit 92c27a3

default  ·  2023-12-26 13:04:13 +0000 UTC
parent e8b94c1
The "boosted" link in html_entry() points to the user in the people page.

This way, it's easier to do something on someone whom we follow,
like MUTE them, limit, etc.
1 files changed,  +5, -2
M html.c
M html.c
+5, -2
 1@@ -634,7 +634,6 @@ static xs_html *html_user_body(snac *user, int local)
 2     else {
 3         xs *n_list = notify_list(user, 1);
 4         int n_len  = xs_list_len(n_list);
 5-        xs *n_str  = NULL;
 6         xs_html *notify_count = NULL;
 7 
 8         /* show the number of new notifications, if there are any */
 9@@ -1342,11 +1341,13 @@ xs_html *html_entry(snac *user, xs_dict *msg, int local,
10             xs *name = actor_name(actor_r);
11 
12             if (!xs_is_null(name)) {
13+                xs *href = xs_fmt("%s/people#%s", user->actor, p);
14+
15                 xs_html_add(post_header,
16                     xs_html_tag("div",
17                         xs_html_attr("class", "snac-origin"),
18                         xs_html_tag("a",
19-                            xs_html_attr("href", xs_dict_get(actor_r, "id")),
20+                            xs_html_attr("href", href),
21                             xs_html_raw(name)), /* already sanitized */
22                             xs_html_text(" "),
23                             xs_html_text(L("boosted"))));
24@@ -1974,6 +1975,8 @@ xs_html *html_people_list(snac *snac, xs_list *list, char *header, char *t)
25         if (valid_status(actor_get(actor_id, &actor))) {
26             xs_html *snac_post = xs_html_tag("div",
27                 xs_html_attr("class", "snac-post"),
28+                xs_html_tag("a",
29+                    xs_html_attr("name", md5)),
30                 xs_html_tag("div",
31                     xs_html_attr("class", "snac-post-header"),
32                     html_actor_icon(actor, xs_dict_get(actor, "published"), NULL, NULL, 0)));