summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/html.c b/html.c
index a15bd06..d325063 100644
--- a/html.c
+++ b/html.c
@@ -2967,9 +2967,12 @@ xs_str *html_notifications(snac *user, int skip, int show)
2967 xs_html_attr("class", "snac-posts")); 2967 xs_html_attr("class", "snac-posts"));
2968 xs_html_add(body, posts); 2968 xs_html_add(body, posts);
2969 2969
2970 xs_list *p = n_list; 2970 xs_set rep;
2971 xs_set_init(&rep);
2972
2971 const xs_str *v; 2973 const xs_str *v;
2972 while (xs_list_iter(&p, &v)) { 2974
2975 xs_list_foreach(n_list, v) {
2973 xs *noti = notify_get(user, v); 2976 xs *noti = notify_get(user, v);
2974 2977
2975 if (noti == NULL) 2978 if (noti == NULL)
@@ -2990,6 +2993,9 @@ xs_str *html_notifications(snac *user, int skip, int show)
2990 2993
2991 object_get(id, &obj); 2994 object_get(id, &obj);
2992 2995
2996 if (xs_set_add(&rep, xs_dict_get(obj, "id")) != 1)
2997 continue;
2998
2993 const char *actor_id = xs_dict_get(noti, "actor"); 2999 const char *actor_id = xs_dict_get(noti, "actor");
2994 xs *actor = NULL; 3000 xs *actor = NULL;
2995 3001
@@ -3103,6 +3109,8 @@ xs_str *html_notifications(snac *user, int skip, int show)
3103 } 3109 }
3104 } 3110 }
3105 3111
3112 xs_set_free(&rep);
3113
3106 if (noti_new == NULL && noti_seen == NULL) 3114 if (noti_new == NULL && noti_seen == NULL)
3107 xs_html_add(body, 3115 xs_html_add(body,
3108 xs_html_tag("h2", 3116 xs_html_tag("h2",