commit 0b08649
default
·
2024-01-24 08:51:16 +0000 UTC
parent 1affef4
Added a fix to also show the mutual emoji in the people page.
1 files changed,
+6,
-4
M
html.c
M
html.c
+6,
-4
1@@ -102,7 +102,7 @@ xs_str *actor_name(xs_dict *actor)
2
3
4 xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date,
5- const char *udate, const char *url, int priv)
6+ const char *udate, const char *url, int priv, int in_people)
7 {
8 xs_html *actor_icon = xs_html_tag("p", NULL);
9
10@@ -128,7 +128,9 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date,
11 if (user) {
12 fwer = follower_check(user, actor_id);
13 fwing = following_check(user, actor_id);
14+ }
15
16+ if (user && !in_people) {
17 /* if this actor is a follower or being followed, create an
18 anchored link to the people page instead of the actor url */
19 if (fwer || fwing) {
20@@ -259,7 +261,7 @@ xs_html *html_msg_icon(snac *user, char *actor_id, const xs_dict *msg)
21 date = xs_dict_get(msg, "published");
22 udate = xs_dict_get(msg, "updated");
23
24- actor_icon = html_actor_icon(user, actor, date, udate, url, priv);
25+ actor_icon = html_actor_icon(user, actor, date, udate, url, priv, 0);
26 }
27
28 return actor_icon;
29@@ -2099,7 +2101,7 @@ xs_html *html_people_list(snac *snac, xs_list *list, char *header, char *t)
30 xs_html_attr("name", md5)),
31 xs_html_tag("div",
32 xs_html_attr("class", "snac-post-header"),
33- html_actor_icon(NULL, actor, xs_dict_get(actor, "published"), NULL, NULL, 0)));
34+ html_actor_icon(snac, actor, xs_dict_get(actor, "published"), NULL, NULL, 0, 1)));
35
36 /* content (user bio) */
37 char *c = xs_dict_get(actor, "summary");
38@@ -2294,7 +2296,7 @@ xs_str *html_notifications(snac *user)
39 xs_html_add(entry,
40 xs_html_tag("div",
41 xs_html_attr("class", "snac-post"),
42- html_actor_icon(user, actor, NULL, NULL, NULL, 0)));
43+ html_actor_icon(user, actor, NULL, NULL, NULL, 0, 0)));
44 }
45 else {
46 xs *md5 = xs_md5_hex(id, strlen(id));