commit d031437
default
·
2024-10-26 11:27:48 +0000 UTC
parent cff5d4d
In notifications, show the emoji of the EmojiReact.
1 files changed,
+10,
-0
M
html.c
M
html.c
+10,
-0
1@@ -2579,6 +2579,7 @@ xs_str *html_notifications(snac *user, int skip, int show)
2 const char *utype = xs_dict_get(noti, "utype");
3 const char *id = xs_dict_get(noti, "objid");
4 const char *date = xs_dict_get(noti, "date");
5+ xs *wrk = NULL;
6
7 if (xs_is_null(id))
8 continue;
9@@ -2605,6 +2606,15 @@ xs_str *html_notifications(snac *user, int skip, int show)
10 else
11 if (strcmp(type, "Undo") == 0 && strcmp(utype, "Follow") == 0)
12 label = L("Unfollow");
13+ else
14+ if (strcmp(type, "EmojiReact") == 0) {
15+ const char *content = xs_dict_get_path(noti, "msg.content");
16+
17+ if (xs_type(content) == XSTYPE_STRING) {
18+ wrk = xs_fmt("%s (%s)", type, content);
19+ label = wrk;
20+ }
21+ }
22
23 xs *s_date = xs_crop_i(xs_dup(date), 0, 10);
24