commit 544a20f
green
·
2025-03-24 10:24:39 +0000 UTC
parent 5fd3823
EmojiReact notifications show up as emojis
1 files changed,
+5,
-3
M
html.c
M
html.c
+5,
-3
1@@ -3350,7 +3350,8 @@ xs_str *html_notifications(snac *user, int skip, int show)
2 continue;
3
4 xs *a_name = actor_name(actor, proxy);
5- const char *label = type;
6+ xs *label_sanatized = sanitize(type);
7+ const char *label = label_sanatized;
8
9 if (strcmp(type, "Create") == 0)
10 label = L("Mention");
11@@ -3365,7 +3366,8 @@ xs_str *html_notifications(snac *user, int skip, int show)
12 const char *content = xs_dict_get_path(noti, "msg.content");
13
14 if (xs_type(content) == XSTYPE_STRING) {
15- wrk = xs_fmt("%s (%s)", type, content);
16+ xs *emoji = replace_shortnames(xs_dup(content), xs_dict_get_path(noti, "msg.tag"), 1, proxy);
17+ wrk = xs_fmt("%s (%s)", type, emoji);
18 label = wrk;
19 }
20 }
21@@ -3377,7 +3379,7 @@ xs_str *html_notifications(snac *user, int skip, int show)
22
23 xs_html *this_html_label = xs_html_container(
24 xs_html_tag("b",
25- xs_html_text(label),
26+ xs_html_raw(label),
27 xs_html_text(" by "),
28 xs_html_tag("a",
29 xs_html_attr("href", actor_id),