summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/html.c b/html.c
index 38cdfe6..8854d0c 100644
--- a/html.c
+++ b/html.c
@@ -1352,8 +1352,9 @@ xs_str *html_notifications(snac *snac)
1352 continue; 1352 continue;
1353 1353
1354 xs *obj = NULL; 1354 xs *obj = NULL;
1355 const char *type = xs_dict_get(noti, "type"); 1355 const char *type = xs_dict_get(noti, "type");
1356 const char *id = xs_dict_get(noti, "objid"); 1356 const char *utype = xs_dict_get(noti, "utype");
1357 const char *id = xs_dict_get(noti, "objid");
1357 1358
1358 if (!valid_status(object_get(id, &obj))) 1359 if (!valid_status(object_get(id, &obj)))
1359 continue; 1360 continue;
@@ -1390,8 +1391,16 @@ xs_str *html_notifications(snac *snac)
1390 1391
1391 s = xs_str_cat(s, "<div>\n"); 1392 s = xs_str_cat(s, "<div>\n");
1392 1393
1394 const char *label = type;
1395
1396 if (strcmp(type, "Create") == 0)
1397 label = L("Mention");
1398 else
1399 if (strcmp(type, "Update") == 0 && strcmp(utype, "Question") == 0)
1400 label = L("Finished poll");
1401
1393 xs *s1 = xs_fmt("<p><b>%s by <a href=\"%s\">%s</a></b>:</p>\n", 1402 xs *s1 = xs_fmt("<p><b>%s by <a href=\"%s\">%s</a></b>:</p>\n",
1394 strcmp(type, "Create") == 0 ? "Mention" : type, actor_id, a_name); 1403 label, actor_id, a_name);
1395 s = xs_str_cat(s, s1); 1404 s = xs_str_cat(s, s1);
1396 1405
1397 if (strcmp(type, "Follow") == 0) { 1406 if (strcmp(type, "Follow") == 0) {