summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/html.c b/html.c
index e1f21bb..31d8d97 100644
--- a/html.c
+++ b/html.c
@@ -2967,6 +2967,9 @@ 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_set rep;
2971 xs_set_init(&rep);
2972
2970 /* dict to store previous notification labels */ 2973 /* dict to store previous notification labels */
2971 xs *admiration_labels = xs_dict_new(); 2974 xs *admiration_labels = xs_dict_new();
2972 2975
@@ -2983,6 +2986,7 @@ xs_str *html_notifications(snac *user, int skip, int show)
2983 const char *utype = xs_dict_get(noti, "utype"); 2986 const char *utype = xs_dict_get(noti, "utype");
2984 const char *id = xs_dict_get(noti, "objid"); 2987 const char *id = xs_dict_get(noti, "objid");
2985 const char *date = xs_dict_get(noti, "date"); 2988 const char *date = xs_dict_get(noti, "date");
2989 const char *id2 = xs_dict_get_path(noti, "msg.id");
2986 xs *wrk = NULL; 2990 xs *wrk = NULL;
2987 2991
2988 if (xs_is_null(id)) 2992 if (xs_is_null(id))
@@ -2991,6 +2995,9 @@ xs_str *html_notifications(snac *user, int skip, int show)
2991 if (is_hidden(user, id)) 2995 if (is_hidden(user, id))
2992 continue; 2996 continue;
2993 2997
2998 if (xs_is_string(id2) && xs_set_add(&rep, id2) != 1)
2999 continue;
3000
2994 object_get(id, &obj); 3001 object_get(id, &obj);
2995 3002
2996 const char *msg_id = NULL; 3003 const char *msg_id = NULL;
@@ -3158,6 +3165,8 @@ xs_str *html_notifications(snac *user, int skip, int show)
3158 xs_html_text(L("More..."))))); 3165 xs_html_text(L("More...")))));
3159 } 3166 }
3160 3167
3168 xs_set_free(&rep);
3169
3161 xs_html_add(body, 3170 xs_html_add(body,
3162 html_footer()); 3171 html_footer());
3163 3172