aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-10-26 13:27:48 +0200
committerdefault <nobody@localhost>2024-10-26 13:27:48 +0200
commitd031437a6e4f05ea3eb3ef74448f873945e9ee7f (patch)
tree5d6910d60f77c691fe24ca9350c1290617b4e554 /html.c
parentcff5d4d4b68b3de91e6ff7470594b55e06c41749 (diff)
In notifications, show the emoji of the EmojiReact.
Diffstat (limited to 'html.c')
-rw-r--r--html.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/html.c b/html.c
index 4d184c6..4d9bba6 100644
--- a/html.c
+++ b/html.c
@@ -2579,6 +2579,7 @@ xs_str *html_notifications(snac *user, int skip, int show)
const char *utype = xs_dict_get(noti, "utype");
const char *id = xs_dict_get(noti, "objid");
const char *date = xs_dict_get(noti, "date");
+ xs *wrk = NULL;
if (xs_is_null(id))
continue;
@@ -2605,6 +2606,15 @@ xs_str *html_notifications(snac *user, int skip, int show)
else
if (strcmp(type, "Undo") == 0 && strcmp(utype, "Follow") == 0)
label = L("Unfollow");
+ else
+ if (strcmp(type, "EmojiReact") == 0) {
+ const char *content = xs_dict_get_path(noti, "msg.content");
+
+ if (xs_type(content) == XSTYPE_STRING) {
+ wrk = xs_fmt("%s (%s)", type, content);
+ label = wrk;
+ }
+ }
xs *s_date = xs_crop_i(xs_dup(date), 0, 10);