commit c87c4dc

byte  ·  2026-01-25 01:00:01 +0000 UTC
parent 56ca23c
style
1 files changed,  +5, -11
M html.c
M html.c
+5, -11
 1@@ -4244,17 +4244,14 @@ xs_str *html_notifications(snac *user, int skip, int show)
 2         xs *label_sanitized = sanitize(type);
 3         const char *label = label_sanitized;
 4 
 5-        if (strcmp(type, "Create") == 0) {
 6+        if (strcmp(type, "Create") == 0)
 7             label = L("Mention");
 8-        }
 9         else
10-        if (strcmp(type, "Update") == 0 && strcmp(utype, "Question") == 0) {
11+        if (strcmp(type, "Update") == 0 && strcmp(utype, "Question") == 0)
12             label = L("Finished poll");
13-        }
14         else
15-        if (strcmp(type, "Undo") == 0 && strcmp(utype, "Follow") == 0) {
16+        if (strcmp(type, "Undo") == 0 && strcmp(utype, "Follow") == 0)
17             label = L("Unfollow");
18-        }
19         else
20         if (strcmp(type, "EmojiReact") == 0 || strcmp(type, "Like") == 0) {
21             const char *content = xs_dict_get_path(noti, "msg.content");
22@@ -4277,11 +4274,8 @@ xs_str *html_notifications(snac *user, int skip, int show)
23             }
24         }
25         else
26-        if (strcmp(type, "Follow") == 0) {
27-            if (pending_check(user, actor_id)) {
28-                label = L("Follow Request");
29-            }
30-        }
31+        if (strcmp(type, "Follow") == 0 && pending_check(user, actor_id))
32+            label = L("Follow Request");
33 
34         xs *s_date = html_date_label(user, date);
35