diff options
| author | 2024-10-26 13:27:48 +0200 | |
|---|---|---|
| committer | 2024-10-26 13:27:48 +0200 | |
| commit | d031437a6e4f05ea3eb3ef74448f873945e9ee7f (patch) | |
| tree | 5d6910d60f77c691fe24ca9350c1290617b4e554 | |
| parent | Fixed HTML typo. (diff) | |
| download | snac2-d031437a6e4f05ea3eb3ef74448f873945e9ee7f.tar.gz snac2-d031437a6e4f05ea3eb3ef74448f873945e9ee7f.tar.xz snac2-d031437a6e4f05ea3eb3ef74448f873945e9ee7f.zip | |
In notifications, show the emoji of the EmojiReact.
| -rw-r--r-- | html.c | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -2579,6 +2579,7 @@ xs_str *html_notifications(snac *user, int skip, int show) | |||
| 2579 | const char *utype = xs_dict_get(noti, "utype"); | 2579 | const char *utype = xs_dict_get(noti, "utype"); |
| 2580 | const char *id = xs_dict_get(noti, "objid"); | 2580 | const char *id = xs_dict_get(noti, "objid"); |
| 2581 | const char *date = xs_dict_get(noti, "date"); | 2581 | const char *date = xs_dict_get(noti, "date"); |
| 2582 | xs *wrk = NULL; | ||
| 2582 | 2583 | ||
| 2583 | if (xs_is_null(id)) | 2584 | if (xs_is_null(id)) |
| 2584 | continue; | 2585 | continue; |
| @@ -2605,6 +2606,15 @@ xs_str *html_notifications(snac *user, int skip, int show) | |||
| 2605 | else | 2606 | else |
| 2606 | if (strcmp(type, "Undo") == 0 && strcmp(utype, "Follow") == 0) | 2607 | if (strcmp(type, "Undo") == 0 && strcmp(utype, "Follow") == 0) |
| 2607 | label = L("Unfollow"); | 2608 | label = L("Unfollow"); |
| 2609 | else | ||
| 2610 | if (strcmp(type, "EmojiReact") == 0) { | ||
| 2611 | const char *content = xs_dict_get_path(noti, "msg.content"); | ||
| 2612 | |||
| 2613 | if (xs_type(content) == XSTYPE_STRING) { | ||
| 2614 | wrk = xs_fmt("%s (%s)", type, content); | ||
| 2615 | label = wrk; | ||
| 2616 | } | ||
| 2617 | } | ||
| 2608 | 2618 | ||
| 2609 | xs *s_date = xs_crop_i(xs_dup(date), 0, 10); | 2619 | xs *s_date = xs_crop_i(xs_dup(date), 0, 10); |
| 2610 | 2620 | ||